ddp.c (90574ebb7e6e0f7f74636ee87315890ba88d6a4a) ddp.c (2c53040f018b6c36a46eec75b9b937aaa5f78e6d)
1/*
2 * DDP: An implementation of the AppleTalk DDP protocol for
3 * Ethernet 'ELAP'.
4 *
5 * Alan Cox <alan@lxorguk.ukuu.org.uk>
6 *
7 * With more than a little assistance from
8 *

--- 115 unchanged lines hidden (view full) ---

124 s = NULL;
125found:
126 read_unlock_bh(&atalk_sockets_lock);
127 return s;
128}
129
130/**
131 * atalk_find_or_insert_socket - Try to find a socket matching ADDR
1/*
2 * DDP: An implementation of the AppleTalk DDP protocol for
3 * Ethernet 'ELAP'.
4 *
5 * Alan Cox <alan@lxorguk.ukuu.org.uk>
6 *
7 * With more than a little assistance from
8 *

--- 115 unchanged lines hidden (view full) ---

124 s = NULL;
125found:
126 read_unlock_bh(&atalk_sockets_lock);
127 return s;
128}
129
130/**
131 * atalk_find_or_insert_socket - Try to find a socket matching ADDR
132 * @sk - socket to insert in the list if it is not there already
133 * @sat - address to search for
132 * @sk: socket to insert in the list if it is not there already
133 * @sat: address to search for
134 *
135 * Try to find a socket matching ADDR in the socket list, if found then return
136 * it. If not, insert SK into the socket list.
137 *
138 * This entire operation must execute atomically.
139 */
140static struct sock *atalk_find_or_insert_socket(struct sock *sk,
141 struct sockaddr_at *sat)

--- 919 unchanged lines hidden (view full) ---

1061 release_sock(sk);
1062 sock_put(sk);
1063 }
1064 return 0;
1065}
1066
1067/**
1068 * atalk_pick_and_bind_port - Pick a source port when one is not given
134 *
135 * Try to find a socket matching ADDR in the socket list, if found then return
136 * it. If not, insert SK into the socket list.
137 *
138 * This entire operation must execute atomically.
139 */
140static struct sock *atalk_find_or_insert_socket(struct sock *sk,
141 struct sockaddr_at *sat)

--- 919 unchanged lines hidden (view full) ---

1061 release_sock(sk);
1062 sock_put(sk);
1063 }
1064 return 0;
1065}
1066
1067/**
1068 * atalk_pick_and_bind_port - Pick a source port when one is not given
1069 * @sk - socket to insert into the tables
1070 * @sat - address to search for
1069 * @sk: socket to insert into the tables
1070 * @sat: address to search for
1071 *
1072 * Pick a source port when one is not given. If we can find a suitable free
1073 * one, we insert the socket into the tables using it.
1074 *
1075 * This whole operation must be atomic.
1076 */
1077static int atalk_pick_and_bind_port(struct sock *sk, struct sockaddr_at *sat)
1078{

--- 896 unchanged lines hidden ---
1071 *
1072 * Pick a source port when one is not given. If we can find a suitable free
1073 * one, we insert the socket into the tables using it.
1074 *
1075 * This whole operation must be atomic.
1076 */
1077static int atalk_pick_and_bind_port(struct sock *sk, struct sockaddr_at *sat)
1078{

--- 896 unchanged lines hidden ---