OpenVPN
Functions
vlan.c File Reference
#include "syshead.h"
#include "multi.h"
#include "options.h"
#include "vlan.h"
Include dependency graph for vlan.c:

Go to the source code of this file.

Functions

static uint16_t vlanhdr_get_vid (const struct openvpn_8021qhdr *hdr)
 
static void vlanhdr_set_vid (struct openvpn_8021qhdr *hdr, const uint16_t vid)
 
int16_t vlan_decapsulate (const struct context *c, struct buffer *buf)
 
void vlan_encapsulate (const struct context *c, struct buffer *buf)
 
bool vlan_is_tagged (const struct buffer *buf)
 
void vlan_process_outgoing_tun (struct multi_context *m, struct multi_instance *mi)
 

Function Documentation

◆ vlan_decapsulate()

int16_t vlan_decapsulate ( const struct context c,
struct buffer buf 
)

◆ vlan_encapsulate()

void vlan_encapsulate ( const struct context c,
struct buffer buf 
)

◆ vlan_is_tagged()

bool vlan_is_tagged ( const struct buffer buf)

Definition at line 266 of file vlan.c.

References BLEN, BPTR, OPENVPN_ETH_P_8021Q, openvpn_8021qhdr::tpid, and vlanhdr_get_vid().

Referenced by multi_process_incoming_link().

◆ vlan_process_outgoing_tun()

void vlan_process_outgoing_tun ( struct multi_context m,
struct multi_instance mi 
)

◆ vlanhdr_get_vid()

static uint16_t vlanhdr_get_vid ( const struct openvpn_8021qhdr hdr)
static

Definition at line 42 of file vlan.c.

References OPENVPN_8021Q_MASK_VID, and openvpn_8021qhdr::pcp_cfi_vid.

Referenced by vlan_decapsulate(), vlan_encapsulate(), and vlan_is_tagged().

◆ vlanhdr_set_vid()

static void vlanhdr_set_vid ( struct openvpn_8021qhdr hdr,
const uint16_t  vid 
)
static

Definition at line 54 of file vlan.c.

References OPENVPN_8021Q_MASK_VID, and openvpn_8021qhdr::pcp_cfi_vid.

Referenced by vlan_encapsulate().