FD.io VPP  v18.04-17-g3a0d853
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 option version = "1.0.1";
17 
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
21  @param rx_vrf_id - Rx/interface vrf id
22  @param server_vrf_id - server vrf id
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 */
29 autoreply define dhcp_proxy_config
30 {
37  u8 dhcp_server[16];
38  u8 dhcp_src_address[16];
39 };
40 
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
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
49  @param is_ipv6 - ip6 if non-zero, else ip4
50  @param is_add - set vss if non-zero, else delete
51 */
52 autoreply define dhcp_proxy_set_vss
53 {
58  u8 vpn_ascii_id[129];
63 };
64 
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
70  @param client_id - Client ID - option 61
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
74  @param set_broadcast_flag - in the DHCP Discover to control
75  how the resulting OFFER is addressed.
76  @param pid - sender's pid
77 */
78 autoreply define dhcp_client_config
79 {
83  u8 hostname[64];
84  u8 client_id[64];
89 };
90 
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
95  @param mask_width - The length of the subnet mask assigned
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 {
104  u8 hostname[64];
107  u8 host_address[16];
108  u8 router_address[16];
109  u8 host_mac[6];
110 };
111 
113  rpc dhcp_client_config returns dhcp_client_config_reply events dhcp_compl_event;
114 };
115 
116 /** \brief Dump DHCP proxy table
117  @param client_index - opaque cookie to identify the sender
118  @param True for IPv6 proxy table
119 */
121 {
125 };
126 
127 typeonly manual_print manual_endian define dhcp_server
128 {
130  u8 dhcp_server[16];
131 };
132 
133 /** \brief Tell client about a DHCP completion event
134  @param client_index - opaque cookie to identify the sender
135 */
136 manual_endian manual_print define dhcp_proxy_details
137 {
143  u8 vss_vpn_ascii_id[129];
145  u8 dhcp_src_address[16];
148 };
149 
150 /*
151  * Local Variables:
152  * eval: (c-set-style "gnu")
153  * End:
154  */
service
Definition: dhcp.api:112
void dhcp_proxy_dump(fib_protocol_t proto, void *opaque, u32 context)
Dump the proxy configs to the API.
Definition: dhcp_proxy.c:248
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, u8 set_broadcast_flag, u32 pid)
Definition: client.c:964
int dhcp_proxy_set_vss(fib_protocol_t proto, u32 tbl_id, u8 vss_type, u8 *vpn_ascii_id, u32 oui, u32 vpn_index, u8 is_del)
Configure/set a new VSS info.
Definition: dhcp_proxy.c:309
option version
Definition: dhcp.api:16
unsigned int u32
Definition: types.h:88
size_t count
Definition: vapi.c:42
unsigned char u8
Definition: types.h:56