summaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorDenis Vlasenko2007-01-29 22:51:25 +0000
committerDenis Vlasenko2007-01-29 22:51:25 +0000
commitb6aae0f38194cd39960a898606ee65d4be93a895 (patch)
treeb73c92aefaf614291a71d05e9d28ca68f4ef021b /networking/udhcp
parenta41fdf331af344ecd3ec230a072857ea197e1890 (diff)
downloadbusybox-b6aae0f38194cd39960a898606ee65d4be93a895.zip
busybox-b6aae0f38194cd39960a898606ee65d4be93a895.tar.gz
preparatory patch for -Wwrite-strings #2
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 ca05a9c..a80691b 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -89,8 +89,8 @@ void udhcp_sp_setup(void);
int udhcp_sp_fd_set(fd_set *rfds, int extra_fd);
int udhcp_sp_read(fd_set *rfds);
int raw_socket(int ifindex);
-int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp);
-int listen_socket(uint32_t ip, int port, char *inf);
+int read_interface(const char *interface, int *ifindex, uint32_t *addr, uint8_t *arp);
+int listen_socket(uint32_t ip, int port, const char *inf);
int pidfile_acquire(const char *pidfile);
void pidfile_write_release(int pid_fd);
int 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 fd17917..4ddd121 100644
--- a/networking/udhcp/dhcpc.h
+++ b/networking/udhcp/dhcpc.h
@@ -20,9 +20,9 @@ struct client_config_t {
char release_on_quit; /* perform release on quit */
char abort_if_no_lease; /* Abort if no lease */
char background_if_no_lease; /* Fork to background if no lease */
- char *interface; /* The name of the interface to use */
+ const char *interface; /* The name of the interface to use */
char *pidfile; /* Optionally store the process ID */
- char *script; /* User script to run at dhcp events */
+ const char *script; /* User script to run at dhcp events */
uint8_t *clientid; /* Optional client id to use */
uint8_t *vendorclass; /* Optional vendor class-id to use */
uint8_t *hostname; /* Optional hostname to use */
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c
index 07f6836..d2b0bb0 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)
}
-static int sprintip(char *dest, char *pre, uint8_t *ip)
+static int sprintip(char *dest, const char *pre, const uint8_t *ip)
{
return sprintf(dest, "%s%d.%d.%d.%d", pre, ip[0], ip[1], ip[2], ip[3]);
}
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index 76ae717..d294fb2 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -37,7 +37,7 @@
#include "common.h"
-int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp)
+int read_interface(const char *interface, int *ifindex, uint32_t *addr, uint8_t *arp)
{
int fd;
struct ifreq ifr;
@@ -88,7 +88,7 @@ int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp)
}
-int listen_socket(uint32_t ip, int port, char *inf)
+int listen_socket(uint32_t ip, int port, const char *inf)
{
struct ifreq interface;
int fd;