blob: e0a7505fe8725c7539e4edd746eaf37f2ebbca16 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001/* Hey Emacs use -*- mode: C -*- */
2
3/*
4 *------------------------------------------------------------------
5 * sockclnt.api - API message(s) to hook up clients, pass traffic
6 * to client processes via TCP sockets
7 *
8 * Copyright (c) 2009 Cisco and/or its affiliates.
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at:
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 *------------------------------------------------------------------
21 */
22
23/*
24 * Create a socket client registration
25 */
26define sockclnt_create {
27 u8 name[64]; /* for show, find by name, whatever */
28 u32 context; /* opaque value to be returned in the reply */
29};
30
31define sockclnt_create_reply {
32 i32 response; /* Non-negative = success */
33 u64 handle; /* handle by which vlib knows this client */
34 u32 index; /* index, used e.g. by API trace replay */
35 u32 context; /* opaque value from the create request */
36};
37
38/*
39 * Delete a client registration
40 */
41define sockclnt_delete {
42 u32 index; /* index, used e.g. by API trace replay */
43 u64 handle; /* handle by which vlib knows this client */
44};
45
46define sockclnt_delete_reply {
47 i32 response; /* Non-negative = success */
48 u64 handle; /* in case the client wonders */
49};
50