Home
last modified time | relevance | path

Searched refs:sfd (Results 1 – 25 of 25) sorted by relevance

/freebsd-11-stable/contrib/blacklist/test/
HDsrvtest.c104 int sfd; in cr() local
107 sfd = socket(af == AF_INET ? PF_INET : PF_INET6, type, 0); in cr()
108 if (sfd == -1) in cr()
128 if (bind(sfd, (const void *)&ss, slen) == -1) in cr()
132 if (listen(sfd, 5) == -1) in cr()
134 return sfd; in cr()
138 handle(int type, int sfd) in handle() argument
145 if ((afd = accept(sfd, (void *)&ss, &alen)) == -1) in handle()
148 afd = sfd; in handle()
HDcltest.c93 int sfd; in main() local
124 if ((sfd = socket(AF_INET, type, 0)) == -1) in main()
129 if (connect(sfd, (const void *)&ss, slen) == -1) in main()
133 if (write(sfd, msg, len) != (ssize_t)len) in main()
/freebsd-11-stable/sbin/ggate/ggatec/
HDggatec.c270 int sfd; in handshake() local
283 sfd = socket(AF_INET, SOCK_STREAM, 0); in handshake()
284 if (sfd == -1) { in handshake()
290 g_gate_socket_settings(sfd); in handshake()
292 if (connect(sfd, (struct sockaddr *)&serv, sizeof(serv)) == -1) { in handshake()
295 close(sfd); in handshake()
310 if (g_gate_send(sfd, &ver, sizeof(ver), MSG_NOSIGNAL) == -1) { in handshake()
313 close(sfd); in handshake()
317 if (g_gate_recv(sfd, &ver, sizeof(ver), MSG_WAITALL) == -1) { in handshake()
320 close(sfd); in handshake()
[all …]
/freebsd-11-stable/sbin/ggate/ggated/
HDggated.c434 connection_new(struct g_gate_cinit *cinit, struct sockaddr *s, int sfd) in connection_new() argument
460 conn->c_sendfd = sfd; in connection_new()
462 conn->c_recvfd = sfd; in connection_new()
475 struct sockaddr *s, int sfd) in connection_add() argument
487 conn->c_sendfd = sfd; in connection_add()
495 conn->c_recvfd = sfd; in connection_add()
588 sendfail(int sfd, int error, const char *fmt, ...) in sendfail() argument
596 data = g_gate_send(sfd, &sinit, sizeof(sinit), 0); in sendfail()
835 handshake(struct sockaddr *from, int sfd) in handshake() argument
849 data = g_gate_recv(sfd, &ver, sizeof(ver), MSG_WAITALL); in handshake()
[all …]
/freebsd-11-stable/contrib/ofed/librdmacm/
HDpreload.c447 static int copysockopts(int dfd, int sfd, struct socket_calls *dapi, in copysockopts() argument
453 ret = sapi->fcntl(sfd, F_GETFL); in copysockopts()
460 ret = sapi->getsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &param, &len); in copysockopts()
467 ret = sapi->getsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &param, &len); in copysockopts()
482 int sfd, dfd, param, ret; in transpose_socket() local
485 sfd = fd_getd(socket); in transpose_socket()
494 ret = sapi->getsockname(sfd, NULL, &len); in transpose_socket()
503 ret = copysockopts(dfd, sfd, dapi, sapi); in transpose_socket()
630 int sfd, dfd, ret; in fork_active() local
635 sfd = fd_getd(socket); in fork_active()
[all …]
/freebsd-11-stable/sbin/ggate/shared/
HDggate.c278 g_gate_socket_settings(int sfd) in g_gate_socket_settings() argument
286 if (setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &on, in g_gate_socket_settings()
291 if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) in g_gate_socket_settings()
294 if (setsockopt(sfd, SOL_SOCKET, SO_RCVBUF, &bsize, sizeof(bsize)) == -1) in g_gate_socket_settings()
297 if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, &bsize, sizeof(bsize)) == -1) in g_gate_socket_settings()
301 if (setsockopt(sfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) { in g_gate_socket_settings()
305 if (setsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1) { in g_gate_socket_settings()
HDggate.h111 void g_gate_socket_settings(int sfd);
/freebsd-11-stable/contrib/ipfilter/ipsend/
HDarp.c67 static int sfd = -1; local
95 if (sfd == -1)
96 if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
102 if (ioctl(sfd, SIOCGARP, (caddr_t)&ar) == -1)
/freebsd-11-stable/crypto/heimdal/kadmin/
HDkadmind.c97 krb5_socket_t sfd = rk_INVALID_SOCKET; in main() local
171 mini_inetd(debug_port, &sfd); in main()
192 sfd = STDIN_FILENO; in main()
198 kadmind_loop(context, keytab, sfd); in main()
/freebsd-11-stable/sbin/swapon/
HDswapon.c458 FILE *sfd; in swap_on_off_md() local
467 sfd = NULL; in swap_on_off_md()
517 sfd = fdopen(fd, "r"); in swap_on_off_md()
518 if (sfd == NULL) { in swap_on_off_md()
523 p = fgetln(sfd, &linelen); in swap_on_off_md()
578 sfd = fdopen(fd, "r"); in swap_on_off_md()
579 if (sfd == NULL) { in swap_on_off_md()
584 p = fgetln(sfd, &linelen); in swap_on_off_md()
637 if (sfd != NULL) in swap_on_off_md()
638 fclose(sfd); in swap_on_off_md()
/freebsd-11-stable/contrib/ipfilter/tools/
HDipfs.c437 int sfd = -1, i; local
443 sfd = open(file, O_RDONLY, 0600);
444 if (sfd == -1) {
456 i = read(sfd, &ips, sizeof(ips));
503 close(sfd);
543 if (sfd != -1)
544 close(sfd);
/freebsd-11-stable/sbin/mdmfs/
HDmdmfs.c455 FILE *sfd; in do_mdconfig_attach_au() local
483 sfd = fdopen(fd, "r"); in do_mdconfig_attach_au()
484 if (sfd == NULL) in do_mdconfig_attach_au()
486 linep = fgetln(sfd, &linelen); in do_mdconfig_attach_au()
502 fclose(sfd); in do_mdconfig_attach_au()
/freebsd-11-stable/usr.sbin/bhyve/
HDrfb.c86 int sfd; member
937 cfd = accept(rc->sfd, NULL, NULL); in rfb_thr()
1007 rc->sfd = socket(ai->ai_family, ai->ai_socktype, 0); in rfb_init()
1008 if (rc->sfd < 0) { in rfb_init()
1014 setsockopt(rc->sfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); in rfb_init()
1016 if (bind(rc->sfd, ai->ai_addr, ai->ai_addrlen) < 0) { in rfb_init()
1022 if (listen(rc->sfd, 1) < 0) { in rfb_init()
1030 if (cap_rights_limit(rc->sfd, &rights) == -1 && errno != ENOSYS) in rfb_init()
/freebsd-11-stable/usr.sbin/lpr/lpd/
HDprintjob.c1008 int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; in sendfile() local
1019 sfd = open(file, O_RDONLY); in sendfile()
1020 if (sfd < 0) { in sendfile()
1030 if ((stb.st_mode & S_IFMT) == S_IFLNK && fstat(sfd, &stb) == 0 && in sendfile()
1032 close(sfd); in sendfile()
1106 filtstat = execfilter(pp, filtcmd, av, sfd, tfd); in sendfile()
1133 close(sfd); in sendfile()
1134 sfd = tfd; in sendfile()
1135 lseek(sfd, 0, SEEK_SET); in sendfile()
1176 if (sizerr == 0 && read(sfd, buf, amt) != amt) in sendfile()
[all …]
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/ttyio/
HDt_ptm.c91 REQUIRE_ERRNO(fstat(ptm.sfd, &stm), -1); in ATF_TC_BODY()
101 (void)close(ptm.sfd); in ATF_TC_BODY()
/freebsd-11-stable/contrib/groff/font/devps/generate/
HDsfdtopfa.pe8 Open($1:r + ".sfd");
HDMakefile204 freeeuro.afm freeeuro.pfa: generate/freeeuro.sfd
205 pfaedit -script generate/sfdtopfa.pe generate/freeeuro.sfd
/freebsd-11-stable/contrib/netbsd-tests/fs/ptyfs/
HDt_nullpts.c114 rump_sys_close(ptg.sfd); in ATF_TC_BODY()
/freebsd-11-stable/contrib/ldns/
HDacx_nlnetlabs.m4932 int sfd, cfd;
945 sfd = socket(PF_INET, SOCK_DGRAM, 0);
946 if(sfd == -1) {
954 if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
958 if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
996 FD_SET(sfd, &rset);
997 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
1003 if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
1013 recv(sfd, &x, sizeof(x), 0);
1021 close(sfd);
/freebsd-11-stable/contrib/unbound/
HDacx_nlnetlabs.m4950 int sfd, cfd;
963 sfd = socket(PF_INET, SOCK_DGRAM, 0);
964 if(sfd == -1) {
972 if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
976 if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
1014 FD_SET(sfd, &rset);
1015 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
1021 if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
1031 recv(sfd, &x, sizeof(x), 0);
1039 close(sfd);
/freebsd-11-stable/usr.bin/tip/tip/
HDtip.h255 EXTERN int sfd; /* for ~< operation */ variable
HDcmds.c89 if ((sfd = creat(cp, 0666)) < 0) { in getfl()
101 transfer(buf, sfd, value(EOFREAD)); in getfl()
/freebsd-11-stable/contrib/file/magic/Magdir/
HDfonts352 !:mime application/vnd.font-fontforge-sfd
/freebsd-11-stable/contrib/sendmail/src/
HDmap.c4837 SM_FILE_T *sfd; local
4861 sfd = safefopen(ldapmap_dequote(lmap->ldap_secret),
4863 if (sfd == NULL)
4870 sfd, TimeOuts.to_fileopen,
4872 (void) sm_io_close(sfd, SM_TIME_DEFAULT);
/freebsd-11-stable/contrib/groff/
HDChangeLog4852 * font/devps/generate/freeeuro.sfd: Make dimensions of Euro.symbol
4863 * font/devps/generate/freeeuro.sfd: Add glyphs `Euro.symbol.slanted'
4897 * font/devps/generate/freeeuro.sfd: New master font file for
4904 `freeeuro.sfd'.