repo.or.cz
/
netsniff-ng-new.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
build: Unify default values for PREFIX and ETCDIR in configure
[netsniff-ng-new.git]
/
vlan.h
blob
b58d1a26f20e224d0a6a2960f140118ccf643bf9
1
#ifndef VLAN_H
2
#define VLAN_H
3
4
#include <stdbool.h>
5
#include <inttypes.h>
6
7
static
inline
uint16_t
vlan_tci2prio
(
uint16_t
tci
)
8
{
9
return
(
tci
&
0xe000
) >>
13
;
10
}
11
12
static
inline
uint16_t
vlan_tci2cfi
(
uint16_t
tci
)
13
{
14
return
(
tci
&
0x1000
) >>
12
;
15
}
16
17
static
inline
uint16_t
vlan_tci2vid
(
uint16_t
tci
)
18
{
19
return
tci
&
0x0fff
;
20
}
21
22
#endif