FD.io VPP
v16.06
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
proxy.h
Go to the documentation of this file.
1
/*
2
* proxy.h: dhcp proxy
3
*
4
* Copyright (c) 2013 Cisco and/or its affiliates.
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at:
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef included_dhcpv6_proxy_h
19
#define included_dhcpv6_proxy_h
20
21
#include <
vnet/vnet.h
>
22
#include <
vnet/ethernet/ethernet.h
>
23
#include <
vnet/ip/ip.h
>
24
#include <
vnet/ip/ip4.h
>
25
#include <
vnet/ip/ip6_packet.h
>
26
#include <
vnet/pg/pg.h
>
27
#include <
vnet/ip/format.h
>
28
#include <
vnet/ip/udp.h
>
29
#include <
vnet/dhcpv6/packet.h
>
30
31
typedef
enum
{
32
#define dhcpv6_proxy_error(n,s) DHCPV6_PROXY_ERROR_##n,
33
#include <
vnet/dhcpv6/proxy_error.def
>
34
#undef dhcpv6_proxy_error
35
DHCPV6_PROXY_N_ERROR
,
36
}
dhcpv6_proxy_error_t
;
37
38
typedef
struct
{
39
u32
oui
;
40
u32
fib_id
;
41
}
dhcpv6_vss_id
;
42
43
typedef
union
{
44
u8
as_u8[8];
45
dhcpv6_vss_id
vpn_id
;
46
}
dhcpv6_vss_info
;
47
48
typedef
struct
{
49
/* server to which we we relay. $$$ vector / pool someday */
50
ip6_address_t
dhcpv6_server
;
51
52
/* FIB index */
53
u32
server_fib_index
;
54
55
/* source address to paste into relayed pkts */
56
ip6_address_t
dhcpv6_src_address
;
57
58
/* all DHCP servers address */
59
ip6_address_t
all_dhcpv6_server_address
;
60
ip6_address_t
all_dhcpv6_server_relay_agent_address
;
61
62
/* true if the relay should insert option 82 */
63
int
insert_option
;
64
65
/* to drop pkts in server-to-client direction */
66
u32
error_drop_node_index
;
67
68
dhcpv6_vss_info
*
vss
;
69
70
/* hash lookup specific vrf_id -> VSS vector index*/
71
uword
*
vss_index_by_vrf_id
;
72
73
/* convenience */
74
vlib_main_t
*
vlib_main
;
75
vnet_main_t
*
vnet_main
;
76
}
dhcpv6_proxy_main_t
;
77
78
dhcpv6_proxy_main_t
dhcpv6_proxy_main
;
79
80
int
dhcpv6_proxy_set_server
(
ip6_address_t
*
addr
,
ip6_address_t
*src_address,
81
u32
fib_id,
int
insert_vss,
int
is_del);
82
83
int
dhcpv6_proxy_set_vss
(
u32
tbl_id,
84
u32
oui,
85
u32
fib_id,
86
int
is_del);
87
88
#endif
/* included_dhcpv6_proxy_h */
packet.h
dhcpv6_proxy_main
dhcpv6_proxy_main_t dhcpv6_proxy_main
Definition:
proxy.h:78
proxy_error.def
dhcpv6_proxy_set_server
int dhcpv6_proxy_set_server(ip6_address_t *addr, ip6_address_t *src_address, u32 fib_id, int insert_vss, int is_del)
Definition:
proxy_node.c:724
format.h
dhcpv6_vss_id
Definition:
proxy.h:38
ip6_packet.h
dhcpv6_proxy_main_t::all_dhcpv6_server_relay_agent_address
ip6_address_t all_dhcpv6_server_relay_agent_address
Definition:
proxy.h:60
ip.h
dhcpv6_vss_id::oui
u32 oui
Definition:
proxy.h:39
dhcpv6_proxy_main_t::vnet_main
vnet_main_t * vnet_main
Definition:
proxy.h:75
dhcpv6_proxy_main_t::server_fib_index
u32 server_fib_index
Definition:
proxy.h:53
dhcpv6_proxy_set_vss
int dhcpv6_proxy_set_vss(u32 tbl_id, u32 oui, u32 fib_id, int is_del)
Definition:
proxy_node.c:865
dhcpv6_proxy_main_t
Definition:
proxy.h:48
dhcpv6_vss_info
Definition:
proxy.h:43
dhcpv6_proxy_main_t::dhcpv6_server
ip6_address_t dhcpv6_server
Definition:
proxy.h:50
dhcpv6_vss_id::fib_id
u32 fib_id
Definition:
proxy.h:40
ethernet.h
dhcpv6_proxy_main_t::vss_index_by_vrf_id
uword * vss_index_by_vrf_id
Definition:
proxy.h:71
vnet.h
DHCPV6_PROXY_N_ERROR
Definition:
proxy.h:35
dhcpv6_vss_info::vpn_id
dhcpv6_vss_id vpn_id
Definition:
proxy.h:45
pg.h
vnet_main_t
Definition:
vnet.h:58
u32
unsigned int u32
Definition:
types.h:88
dhcpv6_proxy_main_t::insert_option
int insert_option
Definition:
proxy.h:63
uword
u64 uword
Definition:
types.h:112
dhcpv6_proxy_error_t
dhcpv6_proxy_error_t
Definition:
proxy.h:31
dhcpv6_proxy_main_t::vss
dhcpv6_vss_info * vss
Definition:
proxy.h:68
u8
unsigned char u8
Definition:
types.h:56
vlib_main_t
Definition:
main.h:59
dhcpv6_proxy_main_t::all_dhcpv6_server_address
ip6_address_t all_dhcpv6_server_address
Definition:
proxy.h:59
addr
vhost_vring_addr_t addr
Definition:
vhost-user.h:78
dhcpv6_proxy_main_t::dhcpv6_src_address
ip6_address_t dhcpv6_src_address
Definition:
proxy.h:56
dhcpv6_proxy_main_t::vlib_main
vlib_main_t * vlib_main
Definition:
proxy.h:74
udp.h
ip6_address_t
Definition:
ip6_packet.h:46
ip4.h
dhcpv6_proxy_main_t::error_drop_node_index
u32 error_drop_node_index
Definition:
proxy.h:66
vnet
vnet
dhcpv6
proxy.h
Generated on Thu Sep 1 2016 09:11:34 for FD.io VPP by
1.8.11