diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/random.h | 6 | ||||
| -rw-r--r-- | include/net/sock.h | 5 | ||||
| -rw-r--r-- | include/uapi/asm-generic/socket.h | 3 |
3 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index d9846088c2c5..347ce553a306 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
| @@ -74,4 +74,10 @@ static inline int arch_get_random_int(unsigned int *v) | |||
| 74 | } | 74 | } |
| 75 | #endif | 75 | #endif |
| 76 | 76 | ||
| 77 | /* Pseudo random number generator from numerical recipes. */ | ||
| 78 | static inline u32 next_pseudo_random32(u32 seed) | ||
| 79 | { | ||
| 80 | return seed * 1664525 + 1013904223; | ||
| 81 | } | ||
| 82 | |||
| 77 | #endif /* _LINUX_RANDOM_H */ | 83 | #endif /* _LINUX_RANDOM_H */ |
diff --git a/include/net/sock.h b/include/net/sock.h index 5a34e2f03657..581dc6bd7dc6 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -140,6 +140,7 @@ typedef __u64 __bitwise __addrpair; | |||
| 140 | * @skc_family: network address family | 140 | * @skc_family: network address family |
| 141 | * @skc_state: Connection state | 141 | * @skc_state: Connection state |
| 142 | * @skc_reuse: %SO_REUSEADDR setting | 142 | * @skc_reuse: %SO_REUSEADDR setting |
| 143 | * @skc_reuseport: %SO_REUSEPORT setting | ||
| 143 | * @skc_bound_dev_if: bound device index if != 0 | 144 | * @skc_bound_dev_if: bound device index if != 0 |
| 144 | * @skc_bind_node: bind hash linkage for various protocol lookup tables | 145 | * @skc_bind_node: bind hash linkage for various protocol lookup tables |
| 145 | * @skc_portaddr_node: second hash linkage for UDP/UDP-Lite protocol | 146 | * @skc_portaddr_node: second hash linkage for UDP/UDP-Lite protocol |
| @@ -179,7 +180,8 @@ struct sock_common { | |||
| 179 | 180 | ||
| 180 | unsigned short skc_family; | 181 | unsigned short skc_family; |
| 181 | volatile unsigned char skc_state; | 182 | volatile unsigned char skc_state; |
| 182 | unsigned char skc_reuse; | 183 | unsigned char skc_reuse:4; |
| 184 | unsigned char skc_reuseport:4; | ||
| 183 | int skc_bound_dev_if; | 185 | int skc_bound_dev_if; |
| 184 | union { | 186 | union { |
| 185 | struct hlist_node skc_bind_node; | 187 | struct hlist_node skc_bind_node; |
| @@ -297,6 +299,7 @@ struct sock { | |||
| 297 | #define sk_family __sk_common.skc_family | 299 | #define sk_family __sk_common.skc_family |
| 298 | #define sk_state __sk_common.skc_state | 300 | #define sk_state __sk_common.skc_state |
| 299 | #define sk_reuse __sk_common.skc_reuse | 301 | #define sk_reuse __sk_common.skc_reuse |
| 302 | #define sk_reuseport __sk_common.skc_reuseport | ||
| 300 | #define sk_bound_dev_if __sk_common.skc_bound_dev_if | 303 | #define sk_bound_dev_if __sk_common.skc_bound_dev_if |
| 301 | #define sk_bind_node __sk_common.skc_bind_node | 304 | #define sk_bind_node __sk_common.skc_bind_node |
| 302 | #define sk_prot __sk_common.skc_prot | 305 | #define sk_prot __sk_common.skc_prot |
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h index 3f6a99201410..4ef3acbba5da 100644 --- a/include/uapi/asm-generic/socket.h +++ b/include/uapi/asm-generic/socket.h | |||
| @@ -22,8 +22,7 @@ | |||
| 22 | #define SO_PRIORITY 12 | 22 | #define SO_PRIORITY 12 |
| 23 | #define SO_LINGER 13 | 23 | #define SO_LINGER 13 |
| 24 | #define SO_BSDCOMPAT 14 | 24 | #define SO_BSDCOMPAT 14 |
| 25 | /* To add :#define SO_REUSEPORT 15 */ | 25 | #define SO_REUSEPORT 15 |
| 26 | |||
| 27 | #ifndef SO_PASSCRED /* powerpc only differs in these */ | 26 | #ifndef SO_PASSCRED /* powerpc only differs in these */ |
| 28 | #define SO_PASSCRED 16 | 27 | #define SO_PASSCRED 16 |
| 29 | #define SO_PEERCRED 17 | 28 | #define SO_PEERCRED 17 |
