FD.io VPP  v17.10-9-gd594711
Vector Packet Processing
dhcp.api
Go to the documentation of this file.
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 rx_vrf_id - Rx/interface vrf id
20  @param server_vrf_id - server vrf id
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 autoreply define dhcp_proxy_config
28 {
35  u8 dhcp_server[16];
36  u8 dhcp_src_address[16];
37 };
38 
39 /** \brief DHCP Proxy set / unset vss request
40  @param client_index - opaque cookie to identify the sender
41  @param context - sender context, to match reply w/ request
42  @param tbl_id - table id
43  @param oui - first part of vpn id
44  @param fib_id - second part of vpn id
45  @param is_ipv6 - ip6 if non-zero, else ip4
46  @param is_add - set vss if non-zero, else delete
47 */
48 autoreply define dhcp_proxy_set_vss
49 {
57 };
58 
59 /** \brief DHCP Client config add / del request
60  @param client_index - opaque cookie to identify the sender
61  @param context - sender context, to match reply w/ request
62  @param sw_if_index - index of the interface for DHCP client
63  @param hostname - hostname
64  @param client_id - Client ID - option 61
65  @param is_add - add the config if non-zero, else delete
66  @param want_dhcp_event - DHCP event sent to the sender
67  via dhcp_compl_event API message if non-zero
68  @param pid - sender's pid
69 */
70 autoreply define dhcp_client_config
71 {
75  u8 hostname[64];
76  u8 client_id[64];
80 };
81 
82 /** \brief Tell client about a DHCP completion event
83  @param client_index - opaque cookie to identify the sender
84  @param pid - client pid registered to receive notification
85  @param is_ipv6 - if non-zero the address is ipv6, else ipv4
86  @param mask_width - The length of the subnet mask assigned
87  @param host_address - Host IP address
88  @param router_address - Router IP address
89  @param host_mac - Host MAC address
90 */
91 define dhcp_compl_event
92 {
95  u8 hostname[64];
98  u8 host_address[16];
99  u8 router_address[16];
100  u8 host_mac[6];
101 };
102 
103 /** \brief Dump DHCP proxy table
104  @param client_index - opaque cookie to identify the sender
105  @param True for IPv6 proxy table
106 */
108 {
112 };
113 
114 typeonly manual_print manual_endian define dhcp_server
115 {
117  u8 dhcp_server[16];
118 };
119 
120 /** \brief Tell client about a DHCP completion event
121  @param client_index - opaque cookie to identify the sender
122 */
123 manual_endian manual_print define dhcp_proxy_details
124 {
130  u8 dhcp_src_address[16];
133 };
134 
135 /*
136  * Local Variables:
137  * eval: (c-set-style "gnu")
138  * End:
139  */
int dhcp_client_config(vlib_main_t *vm, u32 sw_if_index, u8 *hostname, u8 *client_id, u32 is_add, u32 client_index, void *event_callback, u32 pid)
Definition: client.c:937
void dhcp_proxy_dump(fib_protocol_t proto, void *opaque, u32 context)
Dump the proxy configs to the API.
Definition: dhcp_proxy.c:262
unsigned int u32
Definition: types.h:88
size_t count
Definition: vapi.c:40
int dhcp_proxy_set_vss(fib_protocol_t proto, u32 tbl_id, u32 oui, u32 fib_id, int is_del)
Configure/set a new VSS info.
Definition: dhcp_proxy.c:289
unsigned char u8
Definition: types.h:56