diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-01-25 22:46:34 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-01-25 22:46:34 +0000 |
commit | b76b9a4328460fdee7d72c08a89d1d79392beb99 (patch) | |
tree | 9346e038153ee2646e1f036ed6310b97cac5923d /networking/udhcp/common.h | |
parent | 893988182a97bc58d8d1d8eb15d00e427801cedd (diff) | |
download | busybox-w32-b76b9a4328460fdee7d72c08a89d1d79392beb99.tar.gz busybox-w32-b76b9a4328460fdee7d72c08a89d1d79392beb99.tar.bz2 busybox-w32-b76b9a4328460fdee7d72c08a89d1d79392beb99.zip |
udhcpc: filter unwanted packets in kernel
(Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)
Diffstat (limited to 'networking/udhcp/common.h')
-rw-r--r-- | networking/udhcp/common.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 38ede0124..b1d629b18 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -14,6 +14,9 @@ | |||
14 | 14 | ||
15 | #define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" | 15 | #define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" |
16 | 16 | ||
17 | #define SERVER_PORT 67 | ||
18 | #define CLIENT_PORT 68 | ||
19 | |||
17 | extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */ | 20 | extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */ |
18 | 21 | ||
19 | /*** packet.h ***/ | 22 | /*** packet.h ***/ |
@@ -21,7 +24,7 @@ extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */ | |||
21 | #include <netinet/udp.h> | 24 | #include <netinet/udp.h> |
22 | #include <netinet/ip.h> | 25 | #include <netinet/ip.h> |
23 | 26 | ||
24 | #define DHCP_OPTIONS_BUFSIZE 308 | 27 | #define DHCP_OPTIONS_BUFSIZE 308 |
25 | 28 | ||
26 | struct dhcpMessage { | 29 | struct dhcpMessage { |
27 | uint8_t op; | 30 | uint8_t op; |
@@ -93,7 +96,7 @@ int listen_socket(/*uint32_t ip,*/ int port, const char *inf); | |||
93 | int arpping(uint32_t test_ip, uint32_t from_ip, uint8_t *from_mac, const char *interface); | 96 | int arpping(uint32_t test_ip, uint32_t from_ip, uint8_t *from_mac, const char *interface); |
94 | 97 | ||
95 | #if ENABLE_FEATURE_UDHCP_DEBUG | 98 | #if ENABLE_FEATURE_UDHCP_DEBUG |
96 | # define DEBUG(str, args...) bb_info_msg(str, ## args) | 99 | # define DEBUG(str, args...) bb_info_msg("### " str, ## args) |
97 | #else | 100 | #else |
98 | # define DEBUG(str, args...) do {;} while (0) | 101 | # define DEBUG(str, args...) do {;} while (0) |
99 | #endif | 102 | #endif |