2 * Copyright (c) 2015-2019 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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 option version = "2.2.1";
17 import "vnet/ip/ip_types.api";
19 /** \brief The types of packets to be punted
23 /* L4 (UDP) packets */
25 /* IP proto (i.e. OSPF, RIP, etc) packets */
26 PUNT_API_TYPE_IP_PROTO,
27 /* Exception packets handled by the VLIB punt infra */
28 PUNT_API_TYPE_EXCEPTION,
31 /** \brief Punt L4 traffic definition
32 @param af - Address Family, IPv4 or IPV6
33 @param protocol - L4 protocol to be punted
34 @param port - TCP/UDP port to be punted
38 vl_api_address_family_t af;
39 vl_api_ip_proto_t protocol;
43 /** \brief Punt IP protocol traffic definition
44 @param af - Address Family, IPv4 or IPV6
45 @param protocol - IP protocol to be punted
49 vl_api_address_family_t af;
50 vl_api_ip_proto_t protocol;
53 /** \brief The ID of the punt exception reason
54 Dump all the reasons to obtain this
56 typedef punt_exception
61 /** \brief Union of the different punt packet descriptions
65 vl_api_punt_exception_t exception;
67 vl_api_punt_ip_proto_t ip_proto;
70 /** \brief Full description of which packets are requested to be punted
71 @param type - Which packet type
72 @param punt - Description corresponding to the type
76 vl_api_punt_type_t type;
77 vl_api_punt_union_t punt;
80 /** \brief Punt traffic to the host
81 @param client_index - opaque cookie to identify the sender
82 @param context - sender context, to match reply w/ request
83 @param is_add - add punt if non-zero, else delete
84 @param punt - punt definition, only UDP (0x11) is supported
86 autoreply define set_punt {
93 /** \brief Punt traffic to the host via socket
94 @param client_index - opaque cookie to identify the sender
95 @param context - sender context, to match reply w/ request
96 @param header_version - expected meta data header version (currently 1)
97 @param punt - punt definition
99 define punt_socket_register {
104 string pathname[108]; /* Linux sun_path defined to be 108 bytes, see unix(7) */
107 define punt_socket_register_reply
111 string pathname[108];
114 define punt_socket_dump
118 vl_api_punt_type_t type;
121 define punt_socket_details
125 string pathname[108];
128 autoreply define punt_socket_deregister {
140 /** \brief Dump all or one of the exception punt reasons
141 * @param - If the string is not set punt dump all reasons
142 * else dump only the one specified
144 define punt_reason_dump
148 vl_api_punt_reason_t reason;
151 define punt_reason_details
154 vl_api_punt_reason_t reason;
159 * eval: (c-set-style "gnu")