diff options
Diffstat (limited to 'include/net/phonet')
-rw-r--r-- | include/net/phonet/phonet.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/net/phonet/phonet.h b/include/net/phonet/phonet.h index 8b777943d201..2ae5cbb59b60 100644 --- a/include/net/phonet/phonet.h +++ b/include/net/phonet/phonet.h | |||
@@ -29,6 +29,28 @@ | |||
29 | */ | 29 | */ |
30 | #define MAX_PHONET_HEADER 8 | 30 | #define MAX_PHONET_HEADER 8 |
31 | 31 | ||
32 | /* | ||
33 | * Every Phonet* socket has this structure first in its | ||
34 | * protocol-specific structure under name c. | ||
35 | */ | ||
36 | struct pn_sock { | ||
37 | struct sock sk; | ||
38 | u16 sobject; | ||
39 | u8 resource; | ||
40 | }; | ||
41 | |||
42 | static inline struct pn_sock *pn_sk(struct sock *sk) | ||
43 | { | ||
44 | return (struct pn_sock *)sk; | ||
45 | } | ||
46 | |||
47 | extern const struct proto_ops phonet_dgram_ops; | ||
48 | |||
49 | struct sock *pn_find_sock_by_sa(const struct sockaddr_pn *sa); | ||
50 | void pn_sock_hash(struct sock *sk); | ||
51 | void pn_sock_unhash(struct sock *sk); | ||
52 | int pn_sock_get_port(struct sock *sk, unsigned short sport); | ||
53 | |||
32 | static inline struct phonethdr *pn_hdr(struct sk_buff *skb) | 54 | static inline struct phonethdr *pn_hdr(struct sk_buff *skb) |
33 | { | 55 | { |
34 | return (struct phonethdr *)skb_network_header(skb); | 56 | return (struct phonethdr *)skb_network_header(skb); |
@@ -64,6 +86,7 @@ void pn_skb_get_dst_sockaddr(struct sk_buff *skb, struct sockaddr_pn *sa) | |||
64 | 86 | ||
65 | /* Protocols in Phonet protocol family. */ | 87 | /* Protocols in Phonet protocol family. */ |
66 | struct phonet_protocol { | 88 | struct phonet_protocol { |
89 | const struct proto_ops *ops; | ||
67 | struct proto *prot; | 90 | struct proto *prot; |
68 | int sock_type; | 91 | int sock_type; |
69 | }; | 92 | }; |