1 /*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
6 *
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
10 */
11
12 /*
13 * Copyright 2018, Joyent, Inc.
14 */
15
16 #ifndef _OVERLAY_ROUTER_H
17 #define _OVERLAY_ROUTER_H
18
19 #include <sys/types.h>
20 #include <sys/ethernet.h>
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 typedef struct overlay_fabric {
27 struct in6_addr ofb_addr;
28 uint64_t ofb_vid;
29 uint32_t ofb_dcid;
30 uint16_t ofb_vlan;
31 uint8_t ofb_mac[ETHERADDRL];
32 uint8_t ofb_prefixlen;
33 } overlay_fabric_t;
34
35 #define OVERLAY_ROUTER_IOCTL (('o' << 24) | ('v' << 16) | ('r' << 8))
36
37 #define OVERLAY_ROUTETBL_CREATE (OVERLAY_ROUTER_IOCTL | 0x01)
38 #define OVERLAY_ROUTETBL_DELETE (OVERLAY_ROUTER_IOCTL | 0x02)
39 #define OVERLAY_ROUTE_ADD (OVERLAY_ROUTER_IOCTL | 0x03)
40 #define OVERLAY_ROUTE_DELETE (OVERLAY_ROUTER_IOCTL | 0x04)
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif /* _OVERLAY_ROUTER_H */