003 File Manager
Current Path:
/usr/include/net
usr
/
include
/
net
/
📁
..
📁
altq
📄
bpf.h
(14.6 KB)
📄
bpf_buffer.h
(2.04 KB)
📄
bpf_jitter.h
(3.3 KB)
📄
bpf_zerocopy.h
(2.36 KB)
📄
bpfdesc.h
(6.04 KB)
📄
bridgestp.h
(13.06 KB)
📄
debugnet.h
(8.54 KB)
📄
debugnet_int.h
(3.11 KB)
📄
dlt.h
(44.23 KB)
📄
ethernet.h
(22.17 KB)
📄
firewire.h
(3.95 KB)
📄
ieee8023ad_lacp.h
(9.22 KB)
📄
ieee_oui.h
(3.64 KB)
📄
if.h
(22.3 KB)
📄
if_arp.h
(5.41 KB)
📄
if_bridgevar.h
(11.54 KB)
📄
if_clone.h
(3.38 KB)
📄
if_dl.h
(3.56 KB)
📄
if_enc.h
(1.65 KB)
📄
if_gif.h
(4.16 KB)
📄
if_gre.h
(5.69 KB)
📄
if_ipsec.h
(1.62 KB)
📄
if_lagg.h
(8.94 KB)
📄
if_llatbl.h
(9.52 KB)
📄
if_llc.h
(4.53 KB)
📄
if_media.h
(36.45 KB)
📄
if_mib.h
(5.58 KB)
📄
if_pflog.h
(2.24 KB)
📄
if_pfsync.h
(6.85 KB)
📄
if_sppp.h
(8.37 KB)
📄
if_tap.h
(2.54 KB)
📄
if_tun.h
(1.43 KB)
📄
if_types.h
(12.2 KB)
📄
if_var.h
(29.92 KB)
📄
if_vlan_var.h
(6.1 KB)
📄
if_vxlan.h
(4.71 KB)
📄
iflib.h
(14.41 KB)
📄
iflib_private.h
(2.31 KB)
📄
ifq.h
(12.2 KB)
📄
infiniband.h
(2.64 KB)
📄
mp_ring.h
(2.77 KB)
📄
mppc.h
(2.37 KB)
📄
netisr.h
(9.31 KB)
📄
netisr_internal.h
(4.77 KB)
📄
netmap.h
(32.93 KB)
📄
netmap_legacy.h
(9.49 KB)
📄
netmap_user.h
(30.33 KB)
📄
netmap_virt.h
(3.89 KB)
📄
paravirt.h
(6.91 KB)
📄
pfil.h
(5.86 KB)
📄
pfkeyv2.h
(14.54 KB)
📄
pfvar.h
(48.83 KB)
📄
ppp_defs.h
(5.41 KB)
📄
radix.h
(6.83 KB)
📄
raw_cb.h
(3.04 KB)
📄
rndis.h
(10.74 KB)
📁
route
📄
route.h
(16.54 KB)
📄
rss_config.h
(4.69 KB)
📄
sff8436.h
(8.3 KB)
📄
sff8472.h
(18.95 KB)
📄
slcompress.h
(6.4 KB)
📄
toeplitz.h
(1.72 KB)
📄
vnet.h
(14.62 KB)
Editing: if_vxlan.h
/*- * Copyright (c) 2014, Bryan Venteicher <bryanv@FreeBSD.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice unmodified, this list of conditions, and the following * disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _NET_IF_VXLAN_H_ #define _NET_IF_VXLAN_H_ #include <sys/types.h> #include <sys/socket.h> #include <net/ethernet.h> #include <net/if.h> #include <netinet/in.h> struct vxlan_header { uint32_t vxlh_flags; uint32_t vxlh_vni; }; #define VXLAN_HDR_FLAGS_VALID_VNI 0x08000000 #define VXLAN_HDR_VNI_SHIFT 8 #define VXLAN_VNI_MAX (1 << 24) #define VXLAN_VNI_MASK (VXLAN_VNI_MAX - 1) /* * The port assigned by IANA is 4789, but some early implementations * (like Linux) use 8472 instead. If not specified, we default to * the IANA port. */ #define VXLAN_PORT 4789 #define VXLAN_LEGACY_PORT 8472 union vxlan_sockaddr { struct sockaddr sa; struct sockaddr_in in4; struct sockaddr_in6 in6; }; struct ifvxlanparam { uint64_t vxlp_with; #define VXLAN_PARAM_WITH_VNI 0x0001 #define VXLAN_PARAM_WITH_LOCAL_ADDR4 0x0002 #define VXLAN_PARAM_WITH_LOCAL_ADDR6 0x0004 #define VXLAN_PARAM_WITH_REMOTE_ADDR4 0x0008 #define VXLAN_PARAM_WITH_REMOTE_ADDR6 0x0010 #define VXLAN_PARAM_WITH_LOCAL_PORT 0x0020 #define VXLAN_PARAM_WITH_REMOTE_PORT 0x0040 #define VXLAN_PARAM_WITH_PORT_RANGE 0x0080 #define VXLAN_PARAM_WITH_FTABLE_TIMEOUT 0x0100 #define VXLAN_PARAM_WITH_FTABLE_MAX 0x0200 #define VXLAN_PARAM_WITH_MULTICAST_IF 0x0400 #define VXLAN_PARAM_WITH_TTL 0x0800 #define VXLAN_PARAM_WITH_LEARN 0x1000 uint32_t vxlp_vni; union vxlan_sockaddr vxlp_local_sa; union vxlan_sockaddr vxlp_remote_sa; uint16_t vxlp_local_port; uint16_t vxlp_remote_port; uint16_t vxlp_min_port; uint16_t vxlp_max_port; char vxlp_mc_ifname[IFNAMSIZ]; uint32_t vxlp_ftable_timeout; uint32_t vxlp_ftable_max; uint8_t vxlp_ttl; uint8_t vxlp_learn; }; #define VXLAN_SOCKADDR_IS_IPV4(_vxsin) ((_vxsin)->sa.sa_family == AF_INET) #define VXLAN_SOCKADDR_IS_IPV6(_vxsin) ((_vxsin)->sa.sa_family == AF_INET6) #define VXLAN_SOCKADDR_IS_IPV46(_vxsin) \ (VXLAN_SOCKADDR_IS_IPV4(_vxsin) || VXLAN_SOCKADDR_IS_IPV6(_vxsin)) #define VXLAN_CMD_GET_CONFIG 0 #define VXLAN_CMD_SET_VNI 1 #define VXLAN_CMD_SET_LOCAL_ADDR 2 #define VXLAN_CMD_SET_REMOTE_ADDR 4 #define VXLAN_CMD_SET_LOCAL_PORT 5 #define VXLAN_CMD_SET_REMOTE_PORT 6 #define VXLAN_CMD_SET_PORT_RANGE 7 #define VXLAN_CMD_SET_FTABLE_TIMEOUT 8 #define VXLAN_CMD_SET_FTABLE_MAX 9 #define VXLAN_CMD_SET_MULTICAST_IF 10 #define VXLAN_CMD_SET_TTL 11 #define VXLAN_CMD_SET_LEARN 12 #define VXLAN_CMD_FTABLE_ENTRY_ADD 13 #define VXLAN_CMD_FTABLE_ENTRY_REM 14 #define VXLAN_CMD_FLUSH 15 struct ifvxlancfg { uint32_t vxlc_vni; union vxlan_sockaddr vxlc_local_sa; union vxlan_sockaddr vxlc_remote_sa; uint32_t vxlc_mc_ifindex; uint32_t vxlc_ftable_cnt; uint32_t vxlc_ftable_max; uint32_t vxlc_ftable_timeout; uint16_t vxlc_port_min; uint16_t vxlc_port_max; uint8_t vxlc_learn; uint8_t vxlc_ttl; }; struct ifvxlancmd { uint32_t vxlcmd_flags; #define VXLAN_CMD_FLAG_FLUSH_ALL 0x0001 #define VXLAN_CMD_FLAG_LEARN 0x0002 uint32_t vxlcmd_vni; uint32_t vxlcmd_ftable_timeout; uint32_t vxlcmd_ftable_max; uint16_t vxlcmd_port; uint16_t vxlcmd_port_min; uint16_t vxlcmd_port_max; uint8_t vxlcmd_mac[ETHER_ADDR_LEN]; uint8_t vxlcmd_ttl; union vxlan_sockaddr vxlcmd_sa; char vxlcmd_ifname[IFNAMSIZ]; }; #ifdef _KERNEL typedef void (*vxlan_event_handler_t)(void *, struct ifnet *, sa_family_t, u_int); EVENTHANDLER_DECLARE(vxlan_start, vxlan_event_handler_t); EVENTHANDLER_DECLARE(vxlan_stop, vxlan_event_handler_t); #endif #endif /* _NET_IF_VXLAN_H_ */
Upload File
Create Folder