OCT 1. 删除VLAN多余宏定义
This commit is contained in:
parent
50540c0d0c
commit
458691281f
|
@ -311,11 +311,7 @@ int dhcp_tools_init_network(const char *pNicName) {
|
||||||
return ERR_SUCCESS;
|
return ERR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VLAN_SUPPORT
|
|
||||||
init_filter("vlan or (udp and dst port 68)");
|
init_filter("vlan or (udp and dst port 68)");
|
||||||
#else
|
|
||||||
init_filter("udp and dst port 68");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ret = create_udp_raw_socket(g_pNicName);
|
ret = create_udp_raw_socket(g_pNicName);
|
||||||
if (ret != ERR_SUCCESS) {
|
if (ret != ERR_SUCCESS) {
|
||||||
|
|
|
@ -13,8 +13,6 @@ extern "C" {
|
||||||
#include <linux/if_ether.h>
|
#include <linux/if_ether.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#define VLAN_SUPPORT (1)
|
|
||||||
|
|
||||||
#pragma pack(push)
|
#pragma pack(push)
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
|
@ -27,19 +25,15 @@ typedef enum {
|
||||||
} VLAN_TYPE;
|
} VLAN_TYPE;
|
||||||
|
|
||||||
typedef struct vlan_hdr {
|
typedef struct vlan_hdr {
|
||||||
#if VLAN_SUPPORT
|
|
||||||
U16 id;
|
U16 id;
|
||||||
U16 type;
|
U16 type;
|
||||||
#endif
|
|
||||||
} VLAN_HDR, *PVLAN_HDR;
|
} VLAN_HDR, *PVLAN_HDR;
|
||||||
|
|
||||||
typedef struct vlan_hdr2 {
|
typedef struct vlan_hdr2 {
|
||||||
#if VLAN_SUPPORT
|
|
||||||
U16 id1;
|
U16 id1;
|
||||||
U16 h_type;
|
U16 h_type;
|
||||||
U16 id2;
|
U16 id2;
|
||||||
U16 type;
|
U16 type;
|
||||||
#endif
|
|
||||||
} VLAN_HDR2, *PVLAN_HDR2;
|
} VLAN_HDR2, *PVLAN_HDR2;
|
||||||
|
|
||||||
VLAN_TYPE get_package_vlan_type(void *pBuf);
|
VLAN_TYPE get_package_vlan_type(void *pBuf);
|
||||||
|
|
Loading…
Reference in New Issue