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