Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [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 | |
Ole Troan | 9d42087 | 2017-10-12 13:06:35 +0200 | [diff] [blame] | 16 | option version = "1.0.1"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 17 | |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 18 | /** \brief DHCP Proxy config add / del request |
| 19 | @param client_index - opaque cookie to identify the sender |
| 20 | @param context - sender context, to match reply w/ request |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 21 | @param rx_vrf_id - Rx/interface vrf id |
| 22 | @param server_vrf_id - server vrf id |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 23 | @param if_ipv6 - ipv6 if non-zero, else ipv4 |
| 24 | @param is_add - add the config if non-zero, else delete |
| 25 | @param insert_circuit_id - option82 suboption 1 fib number |
| 26 | @param dhcp_server[] - server address |
| 27 | @param dhcp_src_address[] - <fix this, need details> |
| 28 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 29 | autoreply define dhcp_proxy_config |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 30 | { |
| 31 | u32 client_index; |
| 32 | u32 context; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 33 | u32 rx_vrf_id; |
| 34 | u32 server_vrf_id; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 35 | u8 is_ipv6; |
| 36 | u8 is_add; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 37 | u8 dhcp_server[16]; |
| 38 | u8 dhcp_src_address[16]; |
| 39 | }; |
| 40 | |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 41 | /** \brief DHCP Proxy set / unset vss request |
| 42 | @param client_index - opaque cookie to identify the sender |
| 43 | @param context - sender context, to match reply w/ request |
| 44 | @param tbl_id - table id |
John Lo | 70bfcaf | 2017-11-14 13:19:26 -0500 | [diff] [blame] | 45 | @vss_type - 0: use ASCI vpn_id; 1: use oui/vpn_index; 255: global vpn |
| 46 | @vpn_ascii - null terminated ASCII VPN ID up to 128 characters |
| 47 | @param oui - first part of rfc2685 vpn id, 3 bytes oui |
| 48 | @param vpn_index - second part of rfc2685 vpn id, 4 bytes vpn index |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 49 | @param is_ipv6 - ip6 if non-zero, else ip4 |
| 50 | @param is_add - set vss if non-zero, else delete |
| 51 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 52 | autoreply define dhcp_proxy_set_vss |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 53 | { |
| 54 | u32 client_index; |
| 55 | u32 context; |
| 56 | u32 tbl_id; |
John Lo | 70bfcaf | 2017-11-14 13:19:26 -0500 | [diff] [blame] | 57 | u8 vss_type; |
| 58 | u8 vpn_ascii_id[129]; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 59 | u32 oui; |
John Lo | 70bfcaf | 2017-11-14 13:19:26 -0500 | [diff] [blame] | 60 | u32 vpn_index; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 61 | u8 is_ipv6; |
| 62 | u8 is_add; |
| 63 | }; |
| 64 | |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 65 | /** \brief DHCP Client config add / del request |
| 66 | @param client_index - opaque cookie to identify the sender |
| 67 | @param context - sender context, to match reply w/ request |
| 68 | @param sw_if_index - index of the interface for DHCP client |
| 69 | @param hostname - hostname |
Neale Ranns | 51822bf | 2017-07-18 09:26:53 -0700 | [diff] [blame] | 70 | @param client_id - Client ID - option 61 |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 71 | @param is_add - add the config if non-zero, else delete |
| 72 | @param want_dhcp_event - DHCP event sent to the sender |
| 73 | via dhcp_compl_event API message if non-zero |
Neale Ranns | 54c6dc4 | 2018-01-17 10:29:10 -0800 | [diff] [blame^] | 74 | @param set_broadcast_flag - in the DHCP Discover to control |
| 75 | how the resulting OFFER is addressed. |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 76 | @param pid - sender's pid |
| 77 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 78 | autoreply define dhcp_client_config |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 79 | { |
| 80 | u32 client_index; |
| 81 | u32 context; |
| 82 | u32 sw_if_index; |
| 83 | u8 hostname[64]; |
Neale Ranns | 51822bf | 2017-07-18 09:26:53 -0700 | [diff] [blame] | 84 | u8 client_id[64]; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 85 | u8 is_add; |
| 86 | u8 want_dhcp_event; |
Neale Ranns | 54c6dc4 | 2018-01-17 10:29:10 -0800 | [diff] [blame^] | 87 | u8 set_broadcast_flag; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 88 | u32 pid; |
| 89 | }; |
| 90 | |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 91 | /** \brief Tell client about a DHCP completion event |
| 92 | @param client_index - opaque cookie to identify the sender |
| 93 | @param pid - client pid registered to receive notification |
| 94 | @param is_ipv6 - if non-zero the address is ipv6, else ipv4 |
Neale Ranns | 4729b1e | 2017-07-06 01:39:05 -0700 | [diff] [blame] | 95 | @param mask_width - The length of the subnet mask assigned |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 96 | @param host_address - Host IP address |
| 97 | @param router_address - Router IP address |
| 98 | @param host_mac - Host MAC address |
| 99 | */ |
| 100 | define dhcp_compl_event |
| 101 | { |
| 102 | u32 client_index; |
| 103 | u32 pid; |
| 104 | u8 hostname[64]; |
| 105 | u8 is_ipv6; |
Neale Ranns | 4729b1e | 2017-07-06 01:39:05 -0700 | [diff] [blame] | 106 | u8 mask_width; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 107 | u8 host_address[16]; |
| 108 | u8 router_address[16]; |
| 109 | u8 host_mac[6]; |
| 110 | }; |
| 111 | |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 112 | /** \brief Dump DHCP proxy table |
| 113 | @param client_index - opaque cookie to identify the sender |
| 114 | @param True for IPv6 proxy table |
| 115 | */ |
| 116 | define dhcp_proxy_dump |
| 117 | { |
| 118 | u32 client_index; |
| 119 | u32 context; |
| 120 | u8 is_ip6; |
| 121 | }; |
| 122 | |
Neale Ranns | 3466c30 | 2017-02-16 07:45:03 -0800 | [diff] [blame] | 123 | typeonly manual_print manual_endian define dhcp_server |
| 124 | { |
| 125 | u32 server_vrf_id; |
| 126 | u8 dhcp_server[16]; |
| 127 | }; |
| 128 | |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 129 | /** \brief Tell client about a DHCP completion event |
| 130 | @param client_index - opaque cookie to identify the sender |
| 131 | */ |
Neale Ranns | 3466c30 | 2017-02-16 07:45:03 -0800 | [diff] [blame] | 132 | manual_endian manual_print define dhcp_proxy_details |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 133 | { |
| 134 | u32 context; |
| 135 | u32 rx_vrf_id; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 136 | u32 vss_oui; |
| 137 | u32 vss_fib_id; |
John Lo | 70bfcaf | 2017-11-14 13:19:26 -0500 | [diff] [blame] | 138 | u8 vss_type; |
| 139 | u8 vss_vpn_ascii_id[129]; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 140 | u8 is_ipv6; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 141 | u8 dhcp_src_address[16]; |
Neale Ranns | 3466c30 | 2017-02-16 07:45:03 -0800 | [diff] [blame] | 142 | u8 count; |
| 143 | vl_api_dhcp_server_t servers[count]; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 144 | }; |
| 145 | |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 146 | /* |
| 147 | * Local Variables: |
| 148 | * eval: (c-set-style "gnu") |
| 149 | * End: |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 150 | */ |