| /src/lib/libc/rpc/ |
| pmap_getmaps.c | 85 int sock = -1; local 95 PMAPVERS, &sock, 50, 500);
|
| pmap_getport.c | 95 int sock = -1; local 97 return clnttcp_create(address, PMAPPROG, PMAPVERS, &sock, 0, 0); 100 &sock, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
|
| pmap_rmt.c | 94 int sock = -1; local 104 client = clntudp_create(addr, PMAPPROG, PMAPVERS, timeout, &sock);
|
| /src/sbin/mount_nfs/ |
| udp_xfer.c | 68 int sock; local 76 sock = socket(d->ai->ai_family, SOCK_DGRAM, IPPROTO_UDP); 77 if (sock < 0) 79 d->socket = sock; 82 setsockopt(sock, IPPROTO_IP, IP_PORTRANGE, &range, sizeof(range)); 84 if (connect(sock, d->ai->ai_addr, d->ai->ai_addrlen) != 0) 87 return send(sock, pkt, len, 0);
|
| /src/tests/lib/libc/sys/ |
| t_bind.c | 62 int sock = socket(AF_LOCAL, SOCK_STREAM, 0); local 63 ATF_REQUIRE(sock != -1); 66 ATF_REQUIRE(-1 == bind(sock, (struct sockaddr *)&addr, sizeof(addr))); 69 close(sock);
|
| t_connect.c | 117 int sock = socket(AF_LOCAL, SOCK_STREAM, 0); local 118 ATF_REQUIRE(sock != -1); 120 ATF_REQUIRE(-1 == connect(sock, (struct sockaddr *)&addr, sizeof(addr))); 123 close(sock);
|
| /src/sys/arch/hpcmips/stand/lcboot/ |
| dev_net.c | 98 int sock; local 100 sock = *((int *) f->f_devdata); 101 netif_close(sock);
|
| /src/usr.sbin/ypset/ |
| ypset.c | 115 int sock, port; local 132 sock = RPC_ANYSOCK; 134 client = clntudp_create(sin, YPBINDPROG, YPBINDVERS, tv, &sock);
|
| /src/lib/libquota/ |
| quota_nfs.c | 105 int sock = RPC_ANYSOCK; local 116 versnum, timeout, &sock)) == NULL)
|
| /src/usr.sbin/apm/ |
| apm.c | 129 int sock, errr; local 131 sock = socket(AF_LOCAL, SOCK_STREAM, 0); 132 if (sock == -1) 138 if (connect(sock, (struct sockaddr *)&s_un, s_un.sun_len) == -1) { 140 close(sock); 144 return (sock);
|
| /src/regress/sys/net/frag/ |
| ip4_frag_1.c | 156 test_case_0(int sock, in_addr_t target) 166 send_packet(sock, p, target); 169 send_packet(sock, p, target); 173 test_case_1(int sock, in_addr_t target) 185 send_packet(sock, p, target); 189 send_packet(sock, p, target); 193 test_case_2(int sock, in_addr_t target) 206 send_packet(sock, p, target); 209 send_packet(sock, p, target); 213 test_case_3(int sock, in_addr_t target 305 int sock; local [all...] |
| /src/sbin/iscsictl/ |
| iscsic_main.c | 181 static int sock; /* the socket */ variable 204 close(sock); 407 ret = recv(sock, rsp, len, MSG_PEEK | MSG_WAITALL); 430 ret = recv(sock, rsp, len, MSG_WAITALL); 496 ret = sendto(sock, req, len, 0, (struct sockaddr *)(void *)&daemon_name, 552 sock = socket(AF_UNIX, SOCK_DGRAM, 0); 553 if (sock < 0) 562 if (bind(sock, (struct sockaddr *)(void *)&myname, 574 close(sock);
|
| /src/sys/arch/arm/imx/ |
| imx_pcic.c | 456 struct imx_pcic_socket *sock = (struct imx_pcic_socket *)arg; local 460 while (sock->sc->sc_shutdown == 0) { 461 (void) tsleep(sock, PWAIT, "imx_pcicev", 0); 464 (void) tsleep((void *)sock, PWAIT, "imx_pcicss", hz/4); 466 cs = (*sock->pcictag->read)(sock, IMX_PCIC_CARD_STATUS); 467 present = sock->flags & IMX_PCIC_FLAG_CARDP; 473 imx_pcic_event_process(sock); 475 sock->event_thread = NULL; 478 wakeup(sock->sc) [all...] |
| /src/sys/arch/arm/xscale/ |
| pxa2x0_pcic.c | 401 struct pxapcic_socket *sock; local 417 sock = &sc->sc_socket[s[i]]; 422 cs = (*sock->pcictag->read)(sock, PXAPCIC_CARD_STATUS); 424 pxapcic_attach_card(sock); 427 sock, &sock->event_thread, "%s,%d", 428 device_xname(sc->sc_dev), sock->socket)) { 431 sock->socket); 453 struct pxapcic_socket *sock = (struct pxapcic_socket *)arg local [all...] |
| /src/usr.bin/netstat/ |
| unix.c | 144 struct socket sock, *so = &sock; local
|
| /src/usr.sbin/mld6query/ |
| mld6.c | 63 static int sock; variable 110 if ((sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0) 113 if (setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &hlim, 119 if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, 127 if (setsockopt(sock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt, 133 if (sendmsg(sock, &m, 0) < 0) 144 set[0].fd = sock; 152 dump(sock); 294 if (setsockopt(sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &mreq,
|
| /src/usr.sbin/mopd/common/ |
| pf-linux2.c | 172 int sock; local 184 if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { 188 if (ioctl(sock, SIOCADDMULTI, (caddr_t)&ifr) < 0) { 190 close(sock); 193 close(sock); 206 int sock; local 218 if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { 222 if (ioctl(sock, SIOCDELMULTI, (caddr_t)&ifr) < 0) { 224 close(sock); 227 close(sock); [all...] |
| /src/usr.sbin/timed/timedc/ |
| cmds.c | 60 static int sock; variable 136 if (connect(sock, (const struct sockaddr *)addr, 142 set[0].fd = sock; 150 ret = send(sock, &sec, sizeof(sec), 0); 153 warn("send(sock)"); 155 warnx("send(sock): incomplete"); 173 ret = recv(sock, &sec, sizeof(sec), 0); 328 set[0].fd = sock; 339 if (connect(sock, (const struct sockaddr *)&dest, 349 if (send(sock, &msg, sizeof(msg), 0) < 0) [all...] |
| /src/regress/sys/kern/unfdpass/ |
| unfdpass.c | 54 #define SOCK_NAME "test-sock" 90 int listensock, sock, fd, i; local 206 if ((sock = accept(listensock, (struct sockaddr *)&csun, 235 if (recvmsg(sock, &msg, 0) == -1) 238 (void) close(sock); 239 sock = -1; 290 sock = files[i]; 317 } while (sock != -1); 352 int i, fd, sock, nfd, *files; local 367 if ((sock = socket(PF_LOCAL, SOCK_STREAM, 0)) == -1 [all...] |
| /src/sbin/canconfig/ |
| canconfig.c | 127 int sock, ch; local 149 sock = socket(AF_CAN, SOCK_RAW, CAN_RAW); 150 if (sock < 0) 153 printall(sock); 160 sock = socket(AF_CAN, SOCK_RAW, CAN_RAW); 161 if (sock < 0) 166 if (is_can(sock, canifname) == 0) 171 if (ioctl(sock, SIOCGIFFLAGS, &g_ifr) < 0) 178 status(sock, canifname); 182 if (do_cmd(sock, canifname, CANGLINKTIMECAP, &g_cltc, sizeof(g_cltc), 0 [all...] |
| /src/sbin/iscsid/ |
| iscsid_discover.c | 429 if (getsockname(isns->sock, (struct sockaddr *)(void *)&sa, &n)) { 478 int sock = -1; local 516 sock = socket(addr->ai_family, addr->ai_socktype, 519 if (sock == -1) { 525 if (connect(sock, addr->ai_addr, addr->ai_addrlen) != -1) 529 close(sock); 530 sock = -1; 539 if (isns_add_servercon(isns_handle, sock, addr)) { 541 close(sock); 547 isns->sock = sock [all...] |
| iscsid_driverif.c | 91 * sock The socket 99 bind_socket(int sock, uint8_t * addr) 114 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) 117 listen(sock, 5); 186 int sock; local 314 sock = -1; 317 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); 318 if (sock < 0) { 324 if (!bind_socket(sock, init->address)) { 325 close(sock); 511 int sock, ret; local [all...] |
| iscsid_main.c | 135 int sock, i; local 144 sock = socket(AF_UNIX, SOCK_DGRAM, 0); 145 if (sock < 0) { 156 i = sendto(sock, &req, sizeof(req), 0, (struct sockaddr *)(void *)&name, 160 close(sock); 165 if (bind(sock, (struct sockaddr *)(void *)&name, (socklen_t)sizeof(struct sockaddr_un))) { 177 close(sock); 183 close(sock); 191 return sock;
|
| /src/tests/lib/libc/rpc/ |
| t_rpc.c | 48 struct sockaddr *sock = raddrp->buf; local 52 error = getnameinfo(sock, sock->sa_len, host, sizeof(host), NULL, 0, 0);
|
| /src/usr.sbin/nfsd/ |
| nfsd.c | 208 int sock; local 213 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); 215 if (sock == -1) { 221 if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, 230 if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, 238 if (bind(sock, ai->ai_addr, ai->ai_addrlen) == -1) { 245 if (listen(sock, 5) == -1) { 260 set->fd = sock; 262 nfsdargs.sock = sock; [all...] |