On 2016/03/14 21:13, David Gwynne wrote:
> this adds macros to describe the min and max valid vlan ids.
> 
> this will be used in upcoming checks of the configured values from
> userland.
> 
> ok?

Hmm - I think there may be something about using tag 0 to allow
sending packets on an "untagged" vlan with .1q priorities ..

> Index: if_ether.h
> ===================================================================
> RCS file: /cvs/src/sys/netinet/if_ether.h,v
> retrieving revision 1.68
> diff -u -p -r1.68 if_ether.h
> --- if_ether.h        14 Mar 2016 03:48:47 -0000      1.68
> +++ if_ether.h        14 Mar 2016 11:12:24 -0000
> @@ -87,7 +87,11 @@ struct  ether_vlan_header {
>          u_int16_t evl_proto;
>  };
>  
> -#define EVL_VLID_MASK   0x0FFF
> +#define EVL_VLID_MASK        0xFFF
> +#define EVL_VLID_NONE        0x000
> +/* 0x000 and 0xfff are reserved */
> +#define EVL_VLID_MIN 0x001
> +#define EVL_VLID_MAX 0xFFE
>  #define EVL_VLANOFTAG(tag) ((tag) & EVL_VLID_MASK)
>  
>  #define EVL_PRIO_MAX    7
> 

Reply via email to