socks
int result, socks[2];
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, socks) == -1) {
ctxt->pam_psock = socks[0];
ctxt->pam_csock = socks[1];
close(socks[0]);
close(socks[1]);
int gaierr, n, num_socks = 0, socks[NUM_SOCKS];
close(socks[n]);
socks[num_socks++] = sock;
sock = socks[n];
sock = socks[n];
int error, maxs, *s, *socks;
socks = malloc((maxs + 1) * sizeof(int));
if (!socks) {
*socks = 0; /* num of sockets counter at start of array */
s = socks + 1;
(*socks)++;
if (*socks == 0) {
free(socks);
return(socks);
LIST_INSERT_HEAD(&ngsocklist, pcbp, socks);
LIST_REMOVE(pcbp, socks);
LIST_ENTRY(ngpcb) socks; /* linked list of sockets */
LIST_ENTRY(ngpcb) socks; /* linked list of sockets */
static struct socks *socks;
socks = malloc(maxs * sizeof(struct socks));
if (!socks)
memcpy(&socks[nsock].addr, r->ai_addr, r->ai_addrlen);
socks[nsock].addrlen = r->ai_addrlen;
socks[nsock++].sock = sock;
lsent = sendto(socks[i].sock, line, len, 0,
(struct sockaddr *)&socks[i].addr,
socks[i].addrlen);
next = LIST_NEXT(&ngpcb, socks);
int error, maxs, *s, *socks;
socks = malloc((maxs + 1) * sizeof(int));
if (!socks) {
*socks = 0; /* num of sockets counter at start of array */
s = socks + 1;
(*socks)++;
if (*socks == 0) {
free(socks);
return(socks);
close(socks[0]);
priv_fd = socks[1];
close(socks[1]);
if (may_read(socks[0], &cmd, sizeof(int)))
must_read(socks[0], &snaplen, sizeof(int));
must_write(socks[0], &ret, sizeof(int));
send_fd(socks[0], fd);
must_write(socks[0], &ret, sizeof(int));
int i, fd, socks[2], cmd;
if (socketpair(AF_LOCAL, SOCK_STREAM, PF_UNSPEC, socks) == -1)
int error, maxs, *s, *socks;
socks = malloc((maxs+1) * sizeof(int));
if (socks == NULL) {
*socks = 0; /* num of sockets counter at start of array */
s = socks + 1;
(*socks)++;
if (*socks == 0) {
free(socks);
return (socks);