Lines Matching refs:so
155 int so; local
171 if ((so = socket(family, SOCK_DGRAM, 0)) < 0)
179 if (setsockopt(so, proto, optname, policy, len) < 0) {
181 close(so);
187 if (getsockopt(so, proto, optname, getbuf, &len) < 0) {
189 close(so);
202 close(so);
211 close (so);
225 int so; in test2() local
242 if ((so = pfkey_open()) < 0) in test2()
246 if (pfkey_send_spdflush(so) < 0) in test2()
248 m = pfkey_recv(so); in test2()
252 if (pfkey_send_spdsetidx(so, (struct sockaddr *)addr, 128, in test2()
256 m = pfkey_recv(so); in test2()
260 if (pfkey_send_spdupdate(so, (struct sockaddr *)addr, 128, in test2()
264 m = pfkey_recv(so); in test2()
271 if (pfkey_send_spddelete(so, (struct sockaddr *)addr, 128, in test2()
275 m = pfkey_recv(so); in test2()
279 if (pfkey_send_spdadd(so, (struct sockaddr *)addr, 128, in test2()
283 spid = test2sub(so); in test2()
286 if (pfkey_send_spdget(so, spid) < 0) in test2()
288 m = pfkey_recv(so); in test2()
295 if (pfkey_send_spddelete2(so, spid) < 0) in test2()
297 m = pfkey_recv(so); in test2()
301 if (pfkey_send_spdadd2(so, (struct sockaddr *)addr, 128, in test2()
305 spid = test2sub(so); in test2()
309 if (pfkey_send_spdupdate(so, (struct sockaddr *)addr, 128, in test2()
319 test2sub(so) in test2sub() argument
320 int so; in test2sub()
325 if ((msg = pfkey_recv(so)) == NULL)