Lines Matching defs:proto
112 struct proto;
195 struct proto *skc_prot;
489 struct proto *sk_prot_creator;
1250 struct proto {
1372 int proto_register(struct proto *prot, int alloc_slab);
1373 void proto_unregister(struct proto *prot);
1448 proto_memory_allocated(const struct proto *prot)
1511 proto_sockets_allocated_sum_positive(struct proto *prot)
1517 proto_memory_pressure(struct proto *prot)
1533 const struct proto *prot, int val)
1543 int sock_prot_inuse_get(struct net *net, struct proto *proto);
1547 const struct proto *prot, int val)
1842 struct proto *prot, int kern);
1891 static inline void sock_replace_proto(struct sock *sk, struct proto *proto)
1895 WRITE_ONCE(sk->sk_prot, proto);
2951 static inline int sk_get_wmem0(const struct sock *sk, const struct proto *proto)
2953 /* Does this proto have per netns sysctl_wmem ? */
2954 if (proto->sysctl_wmem_offset)
2955 return READ_ONCE(*(int *)((void *)sock_net(sk) + proto->sysctl_wmem_offset));
2957 return READ_ONCE(*proto->sysctl_wmem);
2960 static inline int sk_get_rmem0(const struct sock *sk, const struct proto *proto)
2962 /* Does this proto have per netns sysctl_rmem ? */
2963 if (proto->sysctl_rmem_offset)
2964 return READ_ONCE(*(int *)((void *)sock_net(sk) + proto->sysctl_rmem_offset));
2966 return READ_ONCE(*proto->sysctl_rmem);