patch-1.3.15 linux/net/ipv4/af_inet.c
Next file: linux/net/ipv4/arp.c
Previous file: linux/net/core/dev.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Tue Aug 1 10:02:48 1995
- Orig file:
v1.3.14/linux/net/ipv4/af_inet.c
- Orig date:
Thu Jul 13 16:20:21 1995
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
@@ -1194,7 +1194,7 @@
return(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock, 0));
}
-static int inet_send(struct socket *sock, void *ubuf, int size, int noblock,
+static int inet_send(struct socket *sock, const void *ubuf, int size, int noblock,
unsigned flags)
{
struct sock *sk = (struct sock *) sock->data;
@@ -1208,15 +1208,15 @@
/* We may need to bind the socket. */
if(inet_autobind(sk)!=0)
return(-EAGAIN);
- return(sk->prot->write(sk, (unsigned char *) ubuf, size, noblock, flags));
+ return(sk->prot->write(sk, (const unsigned char *) ubuf, size, noblock, flags));
}
-static int inet_write(struct socket *sock, char *ubuf, int size, int noblock)
+static int inet_write(struct socket *sock, const char *ubuf, int size, int noblock)
{
return inet_send(sock,ubuf,size,noblock,0);
}
-static int inet_sendto(struct socket *sock, void *ubuf, int size, int noblock,
+static int inet_sendto(struct socket *sock, const void *ubuf, int size, int noblock,
unsigned flags, struct sockaddr *sin, int addr_len)
{
struct sock *sk = (struct sock *) sock->data;
@@ -1232,7 +1232,7 @@
/* We may need to bind the socket. */
if(inet_autobind(sk)!=0)
return -EAGAIN;
- return(sk->prot->sendto(sk, (unsigned char *) ubuf, size, noblock, flags,
+ return(sk->prot->sendto(sk, (const unsigned char *) ubuf, size, noblock, flags,
(struct sockaddr_in *)sin, addr_len));
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this