aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/packet.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-09-26 09:34:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-09-26 09:34:59 +0000
commitf1980f67d3b005090a31b7465d219e8ca19c5736 (patch)
tree746646c47f2c42f4b94ced5cb89774406d3e8a24 /networking/udhcp/packet.c
parentcdb0b652ddd6bfbc4d83e21453b3b4137b887e18 (diff)
downloadbusybox-w32-f1980f67d3b005090a31b7465d219e8ca19c5736.tar.gz
busybox-w32-f1980f67d3b005090a31b7465d219e8ca19c5736.tar.bz2
busybox-w32-f1980f67d3b005090a31b7465d219e8ca19c5736.zip
dhcp: add FAST_FUNC as appropriate. -160 bytes.
Diffstat (limited to 'networking/udhcp/packet.c')
-rw-r--r--networking/udhcp/packet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c
index 923add628..58f45e54e 100644
--- a/networking/udhcp/packet.c
+++ b/networking/udhcp/packet.c
@@ -15,7 +15,7 @@
15#include "options.h" 15#include "options.h"
16 16
17 17
18void udhcp_init_header(struct dhcpMessage *packet, char type) 18void FAST_FUNC udhcp_init_header(struct dhcpMessage *packet, char type)
19{ 19{
20 memset(packet, 0, sizeof(struct dhcpMessage)); 20 memset(packet, 0, sizeof(struct dhcpMessage));
21 packet->op = BOOTREQUEST; 21 packet->op = BOOTREQUEST;
@@ -34,7 +34,7 @@ void udhcp_init_header(struct dhcpMessage *packet, char type)
34 34
35 35
36/* read a packet from socket fd, return -1 on read error, -2 on packet error */ 36/* read a packet from socket fd, return -1 on read error, -2 on packet error */
37int udhcp_recv_kernel_packet(struct dhcpMessage *packet, int fd) 37int FAST_FUNC udhcp_recv_kernel_packet(struct dhcpMessage *packet, int fd)
38{ 38{
39 int bytes; 39 int bytes;
40 unsigned char *vendor; 40 unsigned char *vendor;
@@ -85,7 +85,7 @@ int udhcp_recv_kernel_packet(struct dhcpMessage *packet, int fd)
85} 85}
86 86
87 87
88uint16_t udhcp_checksum(void *addr, int count) 88uint16_t FAST_FUNC udhcp_checksum(void *addr, int count)
89{ 89{
90 /* Compute Internet Checksum for "count" bytes 90 /* Compute Internet Checksum for "count" bytes
91 * beginning at location "addr". 91 * beginning at location "addr".
@@ -116,7 +116,7 @@ uint16_t udhcp_checksum(void *addr, int count)
116 116
117 117
118/* Construct a ip/udp header for a packet, send packet */ 118/* Construct a ip/udp header for a packet, send packet */
119int udhcp_send_raw_packet(struct dhcpMessage *payload, 119int FAST_FUNC udhcp_send_raw_packet(struct dhcpMessage *payload,
120 uint32_t source_ip, int source_port, 120 uint32_t source_ip, int source_port,
121 uint32_t dest_ip, int dest_port, const uint8_t *dest_arp, int ifindex) 121 uint32_t dest_ip, int dest_port, const uint8_t *dest_arp, int ifindex)
122{ 122{
@@ -186,7 +186,7 @@ int udhcp_send_raw_packet(struct dhcpMessage *payload,
186 186
187 187
188/* Let the kernel do all the work for packet generation */ 188/* Let the kernel do all the work for packet generation */
189int udhcp_send_kernel_packet(struct dhcpMessage *payload, 189int FAST_FUNC udhcp_send_kernel_packet(struct dhcpMessage *payload,
190 uint32_t source_ip, int source_port, 190 uint32_t source_ip, int source_port,
191 uint32_t dest_ip, int dest_port) 191 uint32_t dest_ip, int dest_port)
192{ 192{