blob: c632c0877ae8de46dbbe8bc66f529c9dc7b415d5 [file] [log] [blame]
Pavel Kotucekc8d87702017-01-25 07:25:32 +01001/*
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 Ranns20a175a2017-02-14 07:28:41 -080019 @param rx_vrf_id - Rx/interface vrf id
20 @param server_vrf_id - server vrf id
Pavel Kotucekc8d87702017-01-25 07:25:32 +010021 @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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040027autoreply define dhcp_proxy_config
Pavel Kotucekc8d87702017-01-25 07:25:32 +010028{
29 u32 client_index;
30 u32 context;
Neale Ranns20a175a2017-02-14 07:28:41 -080031 u32 rx_vrf_id;
32 u32 server_vrf_id;
Pavel Kotucekc8d87702017-01-25 07:25:32 +010033 u8 is_ipv6;
34 u8 is_add;
Pavel Kotucekc8d87702017-01-25 07:25:32 +010035 u8 dhcp_server[16];
36 u8 dhcp_src_address[16];
37};
38
Pavel Kotucekc8d87702017-01-25 07:25:32 +010039/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040048autoreply define dhcp_proxy_set_vss
Pavel Kotucekc8d87702017-01-25 07:25:32 +010049{
50 u32 client_index;
51 u32 context;
52 u32 tbl_id;
53 u32 oui;
54 u32 fib_id;
55 u8 is_ipv6;
56 u8 is_add;
57};
58
Pavel Kotucekc8d87702017-01-25 07:25:32 +010059/** \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
Neale Ranns51822bf2017-07-18 09:26:53 -070064 @param client_id - Client ID - option 61
Pavel Kotucekc8d87702017-01-25 07:25:32 +010065 @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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040070autoreply define dhcp_client_config
Pavel Kotucekc8d87702017-01-25 07:25:32 +010071{
72 u32 client_index;
73 u32 context;
74 u32 sw_if_index;
75 u8 hostname[64];
Neale Ranns51822bf2017-07-18 09:26:53 -070076 u8 client_id[64];
Pavel Kotucekc8d87702017-01-25 07:25:32 +010077 u8 is_add;
78 u8 want_dhcp_event;
79 u32 pid;
80};
81
Pavel Kotucekc8d87702017-01-25 07:25:32 +010082/** \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
Neale Ranns4729b1e2017-07-06 01:39:05 -070086 @param mask_width - The length of the subnet mask assigned
Pavel Kotucekc8d87702017-01-25 07:25:32 +010087 @param host_address - Host IP address
88 @param router_address - Router IP address
89 @param host_mac - Host MAC address
90*/
91define dhcp_compl_event
92{
93 u32 client_index;
94 u32 pid;
95 u8 hostname[64];
96 u8 is_ipv6;
Neale Ranns4729b1e2017-07-06 01:39:05 -070097 u8 mask_width;
Pavel Kotucekc8d87702017-01-25 07:25:32 +010098 u8 host_address[16];
99 u8 router_address[16];
100 u8 host_mac[6];
101};
102
Neale Ranns20a175a2017-02-14 07:28:41 -0800103/** \brief Dump DHCP proxy table
104 @param client_index - opaque cookie to identify the sender
105 @param True for IPv6 proxy table
106*/
107define dhcp_proxy_dump
108{
109 u32 client_index;
110 u32 context;
111 u8 is_ip6;
112};
113
Neale Ranns3466c302017-02-16 07:45:03 -0800114typeonly manual_print manual_endian define dhcp_server
115{
116 u32 server_vrf_id;
117 u8 dhcp_server[16];
118};
119
Neale Ranns20a175a2017-02-14 07:28:41 -0800120/** \brief Tell client about a DHCP completion event
121 @param client_index - opaque cookie to identify the sender
122*/
Neale Ranns3466c302017-02-16 07:45:03 -0800123manual_endian manual_print define dhcp_proxy_details
Neale Ranns20a175a2017-02-14 07:28:41 -0800124{
125 u32 context;
126 u32 rx_vrf_id;
Neale Ranns20a175a2017-02-14 07:28:41 -0800127 u32 vss_oui;
128 u32 vss_fib_id;
129 u8 is_ipv6;
Neale Ranns20a175a2017-02-14 07:28:41 -0800130 u8 dhcp_src_address[16];
Neale Ranns3466c302017-02-16 07:45:03 -0800131 u8 count;
132 vl_api_dhcp_server_t servers[count];
Neale Ranns20a175a2017-02-14 07:28:41 -0800133};
134
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100135/*
136 * Local Variables:
137 * eval: (c-set-style "gnu")
138 * End:
Dave Barach11b8dbf2017-04-24 10:46:54 -0400139 */