FD.io VPP  v17.07-30-g839fa73
Vector Packet Processing
sockclnt.api
Go to the documentation of this file.
1 /* 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  */
26 define 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 
31 define 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  */
41 define 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 
46 define sockclnt_delete_reply {
47  i32 response; /* Non-negative = success */
48  u64 handle; /* in case the client wonders */
49 };
50 
int i32
Definition: types.h:81
unsigned long u64
Definition: types.h:89
unsigned int u32
Definition: types.h:88
unsigned char u8
Definition: types.h:56