Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 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 | |
Pavel Kotucek | e88865d | 2018-11-28 07:42:11 +0100 | [diff] [blame] | 16 | option version = "2.0.0"; |
| 17 | |
| 18 | /** \brief Punt definition |
| 19 | @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All |
| 20 | @param l4_protocol - L4 protocol to be punted |
| 21 | @param l4_port - TCP/UDP port to be punted |
| 22 | */ |
| 23 | typeonly define punt |
| 24 | { |
| 25 | u8 ipv; |
| 26 | u8 l4_protocol; |
| 27 | u16 l4_port; |
| 28 | }; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 29 | |
| 30 | /** \brief Punt traffic to the host |
| 31 | @param client_index - opaque cookie to identify the sender |
| 32 | @param context - sender context, to match reply w/ request |
| 33 | @param is_add - add punt if non-zero, else delete |
Pavel Kotucek | e88865d | 2018-11-28 07:42:11 +0100 | [diff] [blame] | 34 | @param punt - punt definition, only UDP (0x11) is supported |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 35 | */ |
Pavel Kotucek | e88865d | 2018-11-28 07:42:11 +0100 | [diff] [blame] | 36 | autoreply define set_punt { |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 37 | u32 client_index; |
| 38 | u32 context; |
| 39 | u8 is_add; |
Pavel Kotucek | e88865d | 2018-11-28 07:42:11 +0100 | [diff] [blame] | 40 | vl_api_punt_t punt; |
| 41 | }; |
| 42 | |
| 43 | define punt_dump |
| 44 | { |
| 45 | u32 client_index; |
| 46 | u32 context; |
| 47 | u8 is_ipv6; |
| 48 | }; |
| 49 | |
| 50 | define punt_details |
| 51 | { |
| 52 | u32 context; |
| 53 | vl_api_punt_t punt; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 54 | }; |
| 55 | |
| 56 | /** \brief Punt traffic to the host via socket |
| 57 | @param client_index - opaque cookie to identify the sender |
| 58 | @param context - sender context, to match reply w/ request |
| 59 | @param header_version - expected meta data header version (currently 1) |
Pavel Kotucek | e88865d | 2018-11-28 07:42:11 +0100 | [diff] [blame] | 60 | @param punt - punt definition |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 61 | */ |
| 62 | define punt_socket_register { |
| 63 | u32 client_index; |
| 64 | u32 context; |
| 65 | u32 header_version; |
Pavel Kotucek | e88865d | 2018-11-28 07:42:11 +0100 | [diff] [blame] | 66 | vl_api_punt_t punt; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 67 | u8 pathname[108]; /* Linux sun_path defined to be 108 bytes, see unix(7) */ |
| 68 | }; |
| 69 | |
| 70 | define punt_socket_register_reply |
| 71 | { |
Pavel Kotucek | e88865d | 2018-11-28 07:42:11 +0100 | [diff] [blame] | 72 | u32 context; |
| 73 | i32 retval; |
| 74 | u8 pathname[64]; |
| 75 | }; |
| 76 | |
| 77 | define punt_socket_dump |
| 78 | { |
| 79 | u32 client_index; |
| 80 | u32 context; |
| 81 | u8 is_ipv6; |
| 82 | }; |
| 83 | |
| 84 | define punt_socket_details |
| 85 | { |
| 86 | u32 context; |
| 87 | vl_api_punt_t punt; |
| 88 | u8 pathname[108]; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 89 | }; |
| 90 | |
| 91 | autoreply define punt_socket_deregister { |
| 92 | u32 client_index; |
| 93 | u32 context; |
Pavel Kotucek | e88865d | 2018-11-28 07:42:11 +0100 | [diff] [blame] | 94 | vl_api_punt_t punt; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 95 | }; |
| 96 | |
| 97 | /* |
| 98 | * Local Variables: |
| 99 | * eval: (c-set-style "gnu") |
| 100 | * End: |
| 101 | */ |