aboutsummaryrefslogtreecommitdiff
path: root/lwip
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-01-16 18:54:19 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-01-16 19:29:10 +0100
commitdd3048b2e483f66571cfa1b2ccebb2091b9ad990 (patch)
treee8cc587d06c15befd9ab7212938bb0e05a029c23 /lwip
parent2e38095efd8cad7fe6feb95dbeb276b7a4287f05 (diff)
downloadhurd-dd3048b2e483f66571cfa1b2ccebb2091b9ad990.tar.gz
hurd-dd3048b2e483f66571cfa1b2ccebb2091b9ad990.tar.bz2
hurd-dd3048b2e483f66571cfa1b2ccebb2091b9ad990.zip
Make RPC input array parameters const
This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server side")
Diffstat (limited to 'lwip')
-rw-r--r--lwip/iioctl-ops.c12
-rw-r--r--lwip/io-ops.c8
-rw-r--r--lwip/port/netif/hurdtunif.c4
-rw-r--r--lwip/socket-ops.c10
4 files changed, 17 insertions, 17 deletions
diff --git a/lwip/iioctl-ops.c b/lwip/iioctl-ops.c
index 0834cd32..041da106 100644
--- a/lwip/iioctl-ops.c
+++ b/lwip/iioctl-ops.c
@@ -108,7 +108,7 @@ siocgifXaddr (struct sock_user *user,
#define SIOCSIF(name, type) \
kern_return_t \
lwip_S_iioctl_siocsif##name (struct sock_user *user, \
- ifname_t ifnam, \
+ const ifname_t ifnam, \
sockaddr_t addr) \
{ \
return siocsifXaddr (user, ifnam, &addr, type); \
@@ -117,7 +117,7 @@ siocgifXaddr (struct sock_user *user,
/* Set some sockaddr type of info. */
static kern_return_t
siocsifXaddr (struct sock_user *user,
- ifname_t ifnam, sockaddr_t * addr, enum siocgif_type type)
+ const ifname_t ifnam, sockaddr_t * addr, enum siocgif_type type)
{
error_t err = 0;
struct sockaddr_in sin;
@@ -170,7 +170,7 @@ SIOCSIF (dstaddr, DSTADDR);
/* 16 SIOCSIFFLAGS -- Set flags of a network interface. */
kern_return_t
lwip_S_iioctl_siocsifflags (struct sock_user * user,
- ifname_t ifnam,
+ const ifname_t ifnam,
short flags)
{
error_t err = 0;
@@ -244,7 +244,7 @@ lwip_S_iioctl_siocgifmetric (struct sock_user * user,
/* 24 SIOCSIFMETRIC -- Set metric of a network interface. */
kern_return_t
lwip_S_iioctl_siocsifmetric (struct sock_user * user,
- ifname_t ifnam,
+ const ifname_t ifnam,
int metric)
{
return EOPNOTSUPP;
@@ -253,7 +253,7 @@ lwip_S_iioctl_siocsifmetric (struct sock_user * user,
/* 25 SIOCDIFADDR -- Delete interface address. */
kern_return_t
lwip_S_iioctl_siocdifaddr (struct sock_user * user,
- ifname_t ifnam,
+ const ifname_t ifnam,
sockaddr_t addr)
{
return EOPNOTSUPP;
@@ -318,7 +318,7 @@ lwip_S_iioctl_siocgifmtu (struct sock_user * user, ifname_t ifnam, int *mtu)
/* 51 SIOCSIFMTU -- Set mtu of a network interface. */
error_t
-lwip_S_iioctl_siocsifmtu (struct sock_user * user, ifname_t ifnam, int mtu)
+lwip_S_iioctl_siocsifmtu (struct sock_user * user, const ifname_t ifnam, int mtu)
{
error_t err = 0;
struct netif *netif;
diff --git a/lwip/io-ops.c b/lwip/io-ops.c
index 8e84e46b..5461d695 100644
--- a/lwip/io-ops.c
+++ b/lwip/io-ops.c
@@ -34,7 +34,7 @@
error_t
lwip_S_io_write (struct sock_user *user,
- char *data,
+ const_data_t data,
size_t datalen,
off_t offset, mach_msg_type_number_t * amount)
{
@@ -58,7 +58,7 @@ lwip_S_io_write (struct sock_user *user,
error_t
lwip_S_io_read (struct sock_user * user,
- char **data,
+ data_t *data,
size_t * datalen, off_t offset, mach_msg_type_number_t amount)
{
error_t err;
@@ -378,8 +378,8 @@ error_t
lwip_S_io_restrict_auth (struct sock_user * user,
mach_port_t * newobject,
mach_msg_type_name_t * newobject_type,
- uid_t * uids, size_t uidslen,
- uid_t * gids, size_t gidslen)
+ const uid_t * uids, size_t uidslen,
+ const uid_t * gids, size_t gidslen)
{
struct sock_user *newuser;
int i, j;
diff --git a/lwip/port/netif/hurdtunif.c b/lwip/port/netif/hurdtunif.c
index 6e3676c7..79a082cf 100644
--- a/lwip/port/netif/hurdtunif.c
+++ b/lwip/port/netif/hurdtunif.c
@@ -347,7 +347,7 @@ void (*trivfs_protid_destroy_hook) (struct trivfs_protid *) = pi_destroy_hook;
error_t
trivfs_S_io_read (struct trivfs_protid *cred,
mach_port_t reply, mach_msg_type_name_t reply_type,
- char **data, mach_msg_type_number_t * data_len,
+ data_t *data, mach_msg_type_number_t * data_len,
loff_t offs, size_t amount)
{
struct hurdtunif *tunif;
@@ -421,7 +421,7 @@ error_t
trivfs_S_io_write (struct trivfs_protid * cred,
mach_port_t reply,
mach_msg_type_name_t replytype,
- char *data,
+ const_data_t data,
mach_msg_type_number_t datalen,
off_t offset, mach_msg_type_number_t * amount)
{
diff --git a/lwip/socket-ops.c b/lwip/socket-ops.c
index decba3f8..005e41d3 100644
--- a/lwip/socket-ops.c
+++ b/lwip/socket-ops.c
@@ -232,7 +232,7 @@ lwip_S_socket_connect2 (struct sock_user * user, struct sock_user * sock2)
error_t
lwip_S_socket_create_address (mach_port_t server,
int sockaddr_type,
- char *data,
+ const char *data,
mach_msg_type_number_t data_len,
mach_port_t * addr_port,
mach_msg_type_name_t * addr_port_type)
@@ -323,7 +323,7 @@ lwip_S_socket_getopt (struct sock_user * user,
error_t
lwip_S_socket_setopt (struct sock_user * user,
- int level, int option, char *data, size_t datalen)
+ int level, int option, const char *data, size_t datalen)
{
if (!user)
return EOPNOTSUPP;
@@ -337,11 +337,11 @@ error_t
lwip_S_socket_send (struct sock_user * user,
struct sock_addr * addr,
int flags,
- char *data,
+ const char *data,
size_t datalen,
- mach_port_t * ports,
+ const mach_port_t * ports,
size_t nports,
- char *control,
+ const char *control,
size_t controllen, mach_msg_type_number_t * amount)
{
int sent;