Lines Matching defs:newfd
86 static unsigned int process_cmd(int newfd, union mi_commands *mpi);
2270 int newfd;
2283 newfd = accept(sock, (struct sockaddr *)&peer, &peerlen);
2284 if (newfd < 0) {
2298 (void) close(newfd);
2309 (void) close(newfd);
2317 (void) close(newfd);
2332 (void) close(newfd);
2338 (void) close(newfd);
2346 len = read(newfd, &mpi, sizeof (mpi));
2356 (void) close(newfd);
2363 (void) close(newfd);
2373 (void) close(newfd);
2380 (void) close(newfd);
2384 retval = process_cmd(newfd, &mpi);
2389 (void) close(newfd);
2396 process_cmd(int newfd, union mi_commands *mpi)
2405 return (send_result(newfd, IPMP_SUCCESS, 0));
2412 return (send_result(newfd, IPMP_EUNKIF, 0));
2416 return (send_result(newfd, IPMP_FAILURE, errno));
2418 return (send_result(newfd, retval, 0));
2425 return (send_result(newfd, IPMP_EUNKIF, 0));
2429 return (send_result(newfd, IPMP_FAILURE, errno));
2431 return (send_result(newfd, retval, 0));
2434 return (process_query(newfd, &mpi->mi_qcmd));
2440 return (send_result(newfd, IPMP_EPROTO, 0));