aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-29 22:51:25 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-29 22:51:25 +0000
commit2f2ce3c4222378da84c9f5f555c32409566579d8 (patch)
treeb73c92aefaf614291a71d05e9d28ca68f4ef021b /networking/udhcp
parent32d944197db7cd9a6d6014aa83d1d9fd36e4f7ca (diff)
downloadbusybox-w32-2f2ce3c4222378da84c9f5f555c32409566579d8.tar.gz
busybox-w32-2f2ce3c4222378da84c9f5f555c32409566579d8.tar.bz2
busybox-w32-2f2ce3c4222378da84c9f5f555c32409566579d8.zip
preparatory patch for -Wwrite-strings #2
git-svn-id: svn://busybox.net/trunk/busybox@17654 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking/udhcp')
-rw-r--r--networking/udhcp/common.h4
-rw-r--r--networking/udhcp/dhcpc.h4
-rw-r--r--networking/udhcp/script.c2
-rw-r--r--networking/udhcp/socket.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index ca05a9c2c..a80691b4a 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -89,8 +89,8 @@ void udhcp_sp_setup(void);
89int udhcp_sp_fd_set(fd_set *rfds, int extra_fd); 89int udhcp_sp_fd_set(fd_set *rfds, int extra_fd);
90int udhcp_sp_read(fd_set *rfds); 90int udhcp_sp_read(fd_set *rfds);
91int raw_socket(int ifindex); 91int raw_socket(int ifindex);
92int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp); 92int read_interface(const char *interface, int *ifindex, uint32_t *addr, uint8_t *arp);
93int listen_socket(uint32_t ip, int port, char *inf); 93int listen_socket(uint32_t ip, int port, const char *inf);
94int pidfile_acquire(const char *pidfile); 94int pidfile_acquire(const char *pidfile);
95void pidfile_write_release(int pid_fd); 95void pidfile_write_release(int pid_fd);
96int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface); 96int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface);
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h
index fd17917d0..4ddd12120 100644
--- a/networking/udhcp/dhcpc.h
+++ b/networking/udhcp/dhcpc.h
@@ -20,9 +20,9 @@ struct client_config_t {
20 char release_on_quit; /* perform release on quit */ 20 char release_on_quit; /* perform release on quit */
21 char abort_if_no_lease; /* Abort if no lease */ 21 char abort_if_no_lease; /* Abort if no lease */
22 char background_if_no_lease; /* Fork to background if no lease */ 22 char background_if_no_lease; /* Fork to background if no lease */
23 char *interface; /* The name of the interface to use */ 23 const char *interface; /* The name of the interface to use */
24 char *pidfile; /* Optionally store the process ID */ 24 char *pidfile; /* Optionally store the process ID */
25 char *script; /* User script to run at dhcp events */ 25 const char *script; /* User script to run at dhcp events */
26 uint8_t *clientid; /* Optional client id to use */ 26 uint8_t *clientid; /* Optional client id to use */
27 uint8_t *vendorclass; /* Optional vendor class-id to use */ 27 uint8_t *vendorclass; /* Optional vendor class-id to use */
28 uint8_t *hostname; /* Optional hostname to use */ 28 uint8_t *hostname; /* Optional hostname to use */
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c
index 07f68362c..d2b0bb05b 100644
--- a/networking/udhcp/script.c
+++ b/networking/udhcp/script.c
@@ -35,7 +35,7 @@ static inline int upper_length(int length, int opt_index)
35} 35}
36 36
37 37
38static int sprintip(char *dest, char *pre, uint8_t *ip) 38static int sprintip(char *dest, const char *pre, const uint8_t *ip)
39{ 39{
40 return sprintf(dest, "%s%d.%d.%d.%d", pre, ip[0], ip[1], ip[2], ip[3]); 40 return sprintf(dest, "%s%d.%d.%d.%d", pre, ip[0], ip[1], ip[2], ip[3]);
41} 41}
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index 76ae7172d..d294fb259 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -37,7 +37,7 @@
37#include "common.h" 37#include "common.h"
38 38
39 39
40int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp) 40int read_interface(const char *interface, int *ifindex, uint32_t *addr, uint8_t *arp)
41{ 41{
42 int fd; 42 int fd;
43 struct ifreq ifr; 43 struct ifreq ifr;
@@ -88,7 +88,7 @@ int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp)
88} 88}
89 89
90 90
91int listen_socket(uint32_t ip, int port, char *inf) 91int listen_socket(uint32_t ip, int port, const char *inf)
92{ 92{
93 struct ifreq interface; 93 struct ifreq interface;
94 int fd; 94 int fd;