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 | |
| 16 | /** \brief DHCP Proxy config add / del request |
| 17 | @param client_index - opaque cookie to identify the sender |
| 18 | @param context - sender context, to match reply w/ request |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 19 | @param rx_vrf_id - Rx/interface vrf id |
| 20 | @param server_vrf_id - server vrf id |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 21 | @param if_ipv6 - ipv6 if non-zero, else ipv4 |
| 22 | @param is_add - add the config if non-zero, else delete |
| 23 | @param insert_circuit_id - option82 suboption 1 fib number |
| 24 | @param dhcp_server[] - server address |
| 25 | @param dhcp_src_address[] - <fix this, need details> |
| 26 | */ |
| 27 | define dhcp_proxy_config |
| 28 | { |
| 29 | u32 client_index; |
| 30 | u32 context; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 31 | u32 rx_vrf_id; |
| 32 | u32 server_vrf_id; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 33 | u8 is_ipv6; |
| 34 | u8 is_add; |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 35 | u8 dhcp_server[16]; |
| 36 | u8 dhcp_src_address[16]; |
| 37 | }; |
| 38 | |
| 39 | /** \brief DHCP Proxy config response |
| 40 | @param context - sender context, to match reply w/ request |
| 41 | @param retval - return code for the request |
| 42 | */ |
| 43 | define dhcp_proxy_config_reply |
| 44 | { |
| 45 | u32 context; |
| 46 | i32 retval; |
| 47 | }; |
| 48 | |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 49 | /** \brief DHCP Proxy set / unset vss request |
| 50 | @param client_index - opaque cookie to identify the sender |
| 51 | @param context - sender context, to match reply w/ request |
| 52 | @param tbl_id - table id |
| 53 | @param oui - first part of vpn id |
| 54 | @param fib_id - second part of vpn id |
| 55 | @param is_ipv6 - ip6 if non-zero, else ip4 |
| 56 | @param is_add - set vss if non-zero, else delete |
| 57 | */ |
| 58 | define dhcp_proxy_set_vss |
| 59 | { |
| 60 | u32 client_index; |
| 61 | u32 context; |
| 62 | u32 tbl_id; |
| 63 | u32 oui; |
| 64 | u32 fib_id; |
| 65 | u8 is_ipv6; |
| 66 | u8 is_add; |
| 67 | }; |
| 68 | |
| 69 | /** \brief DHCP proxy set / unset vss response |
| 70 | @param context - sender context, to match reply w/ request |
| 71 | @param retval - return code for the request |
| 72 | */ |
| 73 | define dhcp_proxy_set_vss_reply |
| 74 | { |
| 75 | u32 context; |
| 76 | i32 retval; |
| 77 | }; |
| 78 | |
| 79 | /** \brief DHCP Client config add / del request |
| 80 | @param client_index - opaque cookie to identify the sender |
| 81 | @param context - sender context, to match reply w/ request |
| 82 | @param sw_if_index - index of the interface for DHCP client |
| 83 | @param hostname - hostname |
| 84 | @param is_add - add the config if non-zero, else delete |
| 85 | @param want_dhcp_event - DHCP event sent to the sender |
| 86 | via dhcp_compl_event API message if non-zero |
| 87 | @param pid - sender's pid |
| 88 | */ |
| 89 | define dhcp_client_config |
| 90 | { |
| 91 | u32 client_index; |
| 92 | u32 context; |
| 93 | u32 sw_if_index; |
| 94 | u8 hostname[64]; |
| 95 | u8 is_add; |
| 96 | u8 want_dhcp_event; |
| 97 | u32 pid; |
| 98 | }; |
| 99 | |
| 100 | /** \brief DHCP Client config response |
| 101 | @param context - sender context, to match reply w/ request |
| 102 | @param retval - return code for the request |
| 103 | */ |
| 104 | define dhcp_client_config_reply |
| 105 | { |
| 106 | u32 context; |
| 107 | i32 retval; |
| 108 | }; |
| 109 | |
| 110 | /** \brief Tell client about a DHCP completion event |
| 111 | @param client_index - opaque cookie to identify the sender |
| 112 | @param pid - client pid registered to receive notification |
| 113 | @param is_ipv6 - if non-zero the address is ipv6, else ipv4 |
| 114 | @param host_address - Host IP address |
| 115 | @param router_address - Router IP address |
| 116 | @param host_mac - Host MAC address |
| 117 | */ |
| 118 | define dhcp_compl_event |
| 119 | { |
| 120 | u32 client_index; |
| 121 | u32 pid; |
| 122 | u8 hostname[64]; |
| 123 | u8 is_ipv6; |
| 124 | u8 host_address[16]; |
| 125 | u8 router_address[16]; |
| 126 | u8 host_mac[6]; |
| 127 | }; |
| 128 | |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 129 | /** \brief Dump DHCP proxy table |
| 130 | @param client_index - opaque cookie to identify the sender |
| 131 | @param True for IPv6 proxy table |
| 132 | */ |
| 133 | define dhcp_proxy_dump |
| 134 | { |
| 135 | u32 client_index; |
| 136 | u32 context; |
| 137 | u8 is_ip6; |
| 138 | }; |
| 139 | |
Neale Ranns | 3466c30 | 2017-02-16 07:45:03 -0800 | [diff] [blame] | 140 | typeonly manual_print manual_endian define dhcp_server |
| 141 | { |
| 142 | u32 server_vrf_id; |
| 143 | u8 dhcp_server[16]; |
| 144 | }; |
| 145 | |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 146 | /** \brief Tell client about a DHCP completion event |
| 147 | @param client_index - opaque cookie to identify the sender |
| 148 | */ |
Neale Ranns | 3466c30 | 2017-02-16 07:45:03 -0800 | [diff] [blame] | 149 | manual_endian manual_print define dhcp_proxy_details |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 150 | { |
| 151 | u32 context; |
| 152 | u32 rx_vrf_id; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 153 | u32 vss_oui; |
| 154 | u32 vss_fib_id; |
| 155 | u8 is_ipv6; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 156 | u8 dhcp_src_address[16]; |
Neale Ranns | 3466c30 | 2017-02-16 07:45:03 -0800 | [diff] [blame] | 157 | u8 count; |
| 158 | vl_api_dhcp_server_t servers[count]; |
Neale Ranns | 20a175a | 2017-02-14 07:28:41 -0800 | [diff] [blame] | 159 | }; |
| 160 | |
Pavel Kotucek | c8d8770 | 2017-01-25 07:25:32 +0100 | [diff] [blame] | 161 | /* |
| 162 | * Local Variables: |
| 163 | * eval: (c-set-style "gnu") |
| 164 | * End: |
| 165 | */ |