From 458691281fa58cf3a11c6985b269b6244f64949a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Tue, 16 May 2023 15:09:07 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E5=88=A0=E9=99=A4VLAN=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E5=AE=8F=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dhcp_tools/uv_rawsocket.c | 4 ---- srcs/libs/include/network/vlan.h | 6 ------ 2 files changed, 10 deletions(-) diff --git a/dhcp_tools/uv_rawsocket.c b/dhcp_tools/uv_rawsocket.c index 22554c6..4d66545 100644 --- a/dhcp_tools/uv_rawsocket.c +++ b/dhcp_tools/uv_rawsocket.c @@ -311,11 +311,7 @@ int dhcp_tools_init_network(const char *pNicName) { return ERR_SUCCESS; } -#if VLAN_SUPPORT 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); if (ret != ERR_SUCCESS) { diff --git a/srcs/libs/include/network/vlan.h b/srcs/libs/include/network/vlan.h index 891c888..a966410 100644 --- a/srcs/libs/include/network/vlan.h +++ b/srcs/libs/include/network/vlan.h @@ -13,8 +13,6 @@ extern "C" { #include #include "common.h" -#define VLAN_SUPPORT (1) - #pragma pack(push) #pragma pack(1) @@ -27,19 +25,15 @@ typedef enum { } VLAN_TYPE; typedef struct vlan_hdr { -#if VLAN_SUPPORT U16 id; U16 type; -#endif } VLAN_HDR, *PVLAN_HDR; typedef struct vlan_hdr2 { -#if VLAN_SUPPORT U16 id1; U16 h_type; U16 id2; U16 type; -#endif } VLAN_HDR2, *PVLAN_HDR2; VLAN_TYPE get_package_vlan_type(void *pBuf);