diff options
author | Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 2010-09-15 08:30:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-16 00:31:32 -0400 |
commit | 4e3d16ce5e82648d7f4dfd28b6cf8fe2e9a9efc3 (patch) | |
tree | d212f0e503a4db4c2b04a0457250bba940205f39 /include | |
parent | 6482f554e2b9cbe733d63124765104f29cf0c9ad (diff) |
Phonet: resource routing backend
When both destination device and object are nul, Phonet routes the
packet according to the resource field. In fact, this is the most
common pattern when sending Phonet "request" packets. In this case,
the packet is delivered to whichever endpoint (socket) has
registered the resource.
This adds a new table so that Linux processes can register their
Phonet sockets to Phonet resources, if they have adequate privileges.
(Namespace support is not implemented at the moment.)
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/phonet/phonet.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/phonet/phonet.h b/include/net/phonet/phonet.h index 7b114079a51b..d5df797f9540 100644 --- a/include/net/phonet/phonet.h +++ b/include/net/phonet/phonet.h | |||
@@ -54,6 +54,11 @@ void pn_sock_hash(struct sock *sk); | |||
54 | void pn_sock_unhash(struct sock *sk); | 54 | void pn_sock_unhash(struct sock *sk); |
55 | int pn_sock_get_port(struct sock *sk, unsigned short sport); | 55 | int pn_sock_get_port(struct sock *sk, unsigned short sport); |
56 | 56 | ||
57 | struct sock *pn_find_sock_by_res(struct net *net, u8 res); | ||
58 | int pn_sock_bind_res(struct sock *sock, u8 res); | ||
59 | int pn_sock_unbind_res(struct sock *sk, u8 res); | ||
60 | void pn_sock_unbind_all_res(struct sock *sk); | ||
61 | |||
57 | int pn_skb_send(struct sock *sk, struct sk_buff *skb, | 62 | int pn_skb_send(struct sock *sk, struct sk_buff *skb, |
58 | const struct sockaddr_pn *target); | 63 | const struct sockaddr_pn *target); |
59 | 64 | ||