patch-1.3.15 linux/net/ipv4/raw.c

Next file: linux/net/ipv4/tcp.c
Previous file: linux/net/ipv4/packet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.14/linux/net/ipv4/raw.c linux/net/ipv4/raw.c
@@ -127,18 +127,18 @@
  *	Callback support is trivial for SOCK_RAW
  */
   
-static void raw_getfrag(void *p, int saddr, char *to, unsigned int offset, unsigned int fraglen)
+static void raw_getfrag(const void *p, int saddr, char *to, unsigned int offset, unsigned int fraglen)
 {
-	memcpy_fromfs(to, (unsigned char *)p+offset, fraglen);
+	memcpy_fromfs(to, (const unsigned char *)p+offset, fraglen);
 }
 
 /*
  *	IPPROTO_RAW needs extra work.
  */
  
-static void raw_getrawfrag(void *p, int saddr, char *to, unsigned int offset, unsigned int fraglen)
+static void raw_getrawfrag(const void *p, int saddr, char *to, unsigned int offset, unsigned int fraglen)
 {
-	memcpy_fromfs(to, (unsigned char *)p+offset, fraglen);
+	memcpy_fromfs(to, (const unsigned char *)p+offset, fraglen);
 	if(offset==0)
 	{
 		struct iphdr *iph=(struct iphdr *)to;
@@ -155,7 +155,7 @@
 	}
 }
 
-static int raw_sendto(struct sock *sk, unsigned char *from, 
+static int raw_sendto(struct sock *sk, const unsigned char *from, 
 	int len, int noblock, unsigned flags, struct sockaddr_in *usin, int addr_len)
 {
 	int err;
@@ -207,7 +207,7 @@
 }
 
 
-static int raw_write(struct sock *sk, unsigned char *buff, int len, int noblock,
+static int raw_write(struct sock *sk, const unsigned char *buff, int len, int noblock,
 	   unsigned flags)
 {
 	return(raw_sendto(sk, buff, len, noblock, flags, NULL, 0));

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