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:
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.
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
26 autoreply define punt {
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
43 define punt_socket_register {
50 u8 pathname[108]; /* Linux sun_path defined to be 108 bytes, see unix(7) */
53 define punt_socket_register_reply
60 autoreply define punt_socket_deregister {
70 * eval: (c-set-style "gnu")