VPPAPIGEN: vppapigen replacement in Python PLY.
[vpp.git] / src / vnet / ip / punt.api
1 /*
2  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 option version = "1.0.0";
17
18 /** \brief Punt traffic to the host
19     @param client_index - opaque cookie to identify the sender
20     @param context - sender context, to match reply w/ request
21     @param is_add - add punt if non-zero, else delete
22     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
23     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
24     @param l4_port - TCP/UDP port to be punted
25 */
26 autoreply define punt {
27     u32 client_index;
28     u32 context;
29     u8 is_add;
30     u8 ipv;
31     u8 l4_protocol;
32     u16 l4_port;
33 };
34
35 /** \brief Punt traffic to the host via socket
36     @param client_index - opaque cookie to identify the sender
37     @param context - sender context, to match reply w/ request
38     @param header_version - expected meta data header version (currently 1)
39     @param is_ip4 - L3 protocol 1 - IPv4, 0 - IPv6
40     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
41     @param l4_port - TCP/UDP port to be punted
42 */
43 define punt_socket_register {
44     u32 client_index;
45     u32 context;
46     u32 header_version;
47     u8 is_ip4;
48     u8 l4_protocol;
49     u16 l4_port;
50     u8 pathname[108]; /* Linux sun_path defined to be 108 bytes, see unix(7) */
51 };
52
53 define punt_socket_register_reply
54 {
55   u32 context;
56   i32 retval;
57   u8 pathname[64];
58 };
59
60 autoreply define punt_socket_deregister {
61     u32 client_index;
62     u32 context;
63     u8 is_ip4;
64     u8 l4_protocol;
65     u16 l4_port;
66 };
67
68 /*
69  * Local Variables:
70  * eval: (c-set-style "gnu")
71  * End:
72  */