aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/common.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-01-25 22:46:34 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-01-25 22:46:34 +0000
commitb76b9a4328460fdee7d72c08a89d1d79392beb99 (patch)
tree9346e038153ee2646e1f036ed6310b97cac5923d /networking/udhcp/common.h
parent893988182a97bc58d8d1d8eb15d00e427801cedd (diff)
downloadbusybox-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.h7
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
17extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */ 20extern 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
26struct dhcpMessage { 29struct dhcpMessage {
27 uint8_t op; 30 uint8_t op;
@@ -93,7 +96,7 @@ int listen_socket(/*uint32_t ip,*/ int port, const char *inf);
93int arpping(uint32_t test_ip, uint32_t from_ip, uint8_t *from_mac, const char *interface); 96int 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