Module Name:    src
Committed By:   pooka
Date:           Fri Jul 20 09:02:48 UTC 2012

Modified Files:
        src/sys/rump/include/rump: makerumpdefs.sh

Log Message:
add some network-related compat defs


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/include/rump/makerumpdefs.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/rump/makerumpdefs.sh
diff -u src/sys/rump/include/rump/makerumpdefs.sh:1.6 src/sys/rump/include/rump/makerumpdefs.sh:1.7
--- src/sys/rump/include/rump/makerumpdefs.sh:1.6	Fri Jul  2 10:44:26 2010
+++ src/sys/rump/include/rump/makerumpdefs.sh	Fri Jul 20 09:02:48 2012
@@ -8,7 +8,7 @@ echo Generating rumpdefs.h
 rm -f rumpdefs.h
 exec > rumpdefs.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.6 2010/07/02 10:44:26 hannken Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.7 2012/07/20 09:02:48 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
@@ -19,6 +19,22 @@ fromvers () {
 	sed -n '1{s/\$//gp;q;}' $1
 }
 
+# Odds of sockaddr_in changing are zero, so no acrobatics needed.  Alas,
+# dealing with in_addr_t for s_addr is very difficult, so have it as
+# an incompatible uint32_t for now.
+echo
+cat <<EOF
+struct rump_sockaddr_in {
+	uint8_t		sin_len;
+	uint8_t		sin_family;
+	uint16_t	sin_port;
+	struct {
+			uint32_t s_addr;
+	} sin_addr;
+	int8_t		sin_zero[8];
+};
+EOF
+
 fromvers ../../../sys/fcntl.h
 sed -n '/#define	O_[A-Z]*	*0x/s/O_/RUMP_O_/gp' \
     < ../../../sys/fcntl.h
@@ -41,4 +57,14 @@ sed -n '/#define.*RB_[A-Z]/s/RB_/RUMP_RB
 sed -n '/#define.*AB_[A-Z]/s/AB_/RUMP_AB_/gp' <../../../sys/reboot.h	\
     | sed 's,/\*.*$,,'
 
+fromvers ../../../sys/socket.h
+sed -n '/#define[ 	]*SOCK_[A-Z]/s/SOCK_/RUMP_SOCK_/gp' <../../../sys/socket.h \
+    | sed 's,/\*.*$,,'
+sed -n '/#define[ 	]*[AP]F_[A-Z]/s/[AP]F_/RUMP_&/gp' <../../../sys/socket.h \
+    | sed 's,/\*.*$,,'
+sed -n '/#define[ 	]*SO_[A-Z]/s/SO_/RUMP_&/gp' <../../../sys/socket.h \
+    | sed 's,/\*.*$,,'
+sed -n '/#define[ 	]*SOL_[A-Z]/s/SOL_/RUMP_&/gp' <../../../sys/socket.h \
+    | sed 's,/\*.*$,,'
+
 printf '\n#endif /* _RUMP_RUMPDEFS_H_ */\n'

Reply via email to