Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159322
b: refs/heads/master
c: 49c794e
h: refs/heads/master
v: v3
  • Loading branch information
Jan Engelhardt authored and David S. Miller committed Aug 5, 2009
1 parent c48ae79 commit 146c785
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1c00ab8626298ac784ea344bf10e94b5bd9bcb5
refs/heads/master: 49c794e94649020248e37b78db16cd25bad38b4f
1 change: 1 addition & 0 deletions trunk/arch/alpha/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define SO_RCVTIMEO 0x1012
#define SO_SNDTIMEO 0x1013
#define SO_ACCEPTCONN 0x1014
#define SO_PROTOCOL 0x1028

/* linux-specific, might as well be the same as on i386 */
#define SO_NO_CHECK 11
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/avr32/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* __ASM_AVR32_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/cris/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_SOCKET_H */


2 changes: 2 additions & 0 deletions trunk/arch/frv/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_SOCKET_H */

2 changes: 2 additions & 0 deletions trunk/arch/h8300/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/ia64/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_IA64_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/m32r/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_M32R_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/m68k/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/microblaze/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_MICROBLAZE_SOCKET_H */
1 change: 1 addition & 0 deletions trunk/arch/mips/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
#define SO_SNDTIMEO 0x1005 /* send timeout */
#define SO_RCVTIMEO 0x1006 /* receive timeout */
#define SO_ACCEPTCONN 0x1009
#define SO_PROTOCOL 0x1028 /* protocol type */

/* linux-specific, might as well be the same as on i386 */
#define SO_NO_CHECK 11
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/mn10300/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_SOCKET_H */
1 change: 1 addition & 0 deletions trunk/arch/parisc/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define SO_RCVTIMEO 0x1006
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
#define SO_PROTOCOL 0x1028
#define SO_PEERNAME 0x2000

#define SO_NO_CHECK 0x400b
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_POWERPC_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/s390/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/sparc/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define SO_RCVBUFFORCE 0x100b
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
#define SO_PROTOCOL 0x1028


/* Linux specific, keep the same. */
#define SO_NO_CHECK 0x000b
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _ASM_X86_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/xtensa/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* _XTENSA_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/include/asm-generic/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,6 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38

#endif /* __ASM_GENERIC_SOCKET_H */
5 changes: 5 additions & 0 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
sk->sk_reuse = valbool;
break;
case SO_TYPE:
case SO_PROTOCOL:
case SO_ERROR:
ret = -ENOPROTOOPT;
break;
Expand Down Expand Up @@ -764,6 +765,10 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
v.val = sk->sk_type;
break;

case SO_PROTOCOL:
v.val = sk->sk_protocol;
break;

case SO_ERROR:
v.val = -sock_error(sk);
if (v.val == 0)
Expand Down

0 comments on commit 146c785

Please sign in to comment.