|
@@ -105,6 +105,7 @@ struct proto;
|
|
|
* @skc_refcnt: reference count
|
|
|
* @skc_hash: hash value used with various protocol lookup tables
|
|
|
* @skc_prot: protocol handlers inside a network family
|
|
|
+ * @skc_net: reference to the network namespace of this socket
|
|
|
*
|
|
|
* This is the minimal network layer representation of sockets, the header
|
|
|
* for struct sock and struct inet_timewait_sock.
|
|
@@ -119,6 +120,7 @@ struct sock_common {
|
|
|
atomic_t skc_refcnt;
|
|
|
unsigned int skc_hash;
|
|
|
struct proto *skc_prot;
|
|
|
+ struct net *skc_net;
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -195,6 +197,7 @@ struct sock {
|
|
|
#define sk_refcnt __sk_common.skc_refcnt
|
|
|
#define sk_hash __sk_common.skc_hash
|
|
|
#define sk_prot __sk_common.skc_prot
|
|
|
+#define sk_net __sk_common.skc_net
|
|
|
unsigned char sk_shutdown : 2,
|
|
|
sk_no_check : 2,
|
|
|
sk_userlocks : 4;
|