builtins.c (49005) | builtins.c (49015) |
---|---|
1/*- 2 * Copyright (c) 1983, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1983, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $Id: builtins.c,v 1.2 1999/07/22 21:11:40 green Exp $ | 26 * $Id: builtins.c,v 1.3 1999/07/22 21:42:49 green Exp $ |
27 * 28 */ 29 30#include <sys/filio.h> 31#include <sys/ioccom.h> 32#include <sys/param.h> 33#include <sys/stat.h> 34#include <sys/socket.h> --- 335 unchanged lines hidden (view full) --- 370 if (ioctl(s, FIONREAD, &len) == -1) 371 iderror(0, 0, s, errno); 372 if (len >= sizeof(buf)) 373 len = sizeof(buf) - 1; 374 len = read(s, buf, len); 375 if (len == -1) 376 iderror(0, 0, s, errno); 377 buf[len] = '\0'; | 27 * 28 */ 29 30#include <sys/filio.h> 31#include <sys/ioccom.h> 32#include <sys/param.h> 33#include <sys/stat.h> 34#include <sys/socket.h> --- 335 unchanged lines hidden (view full) --- 370 if (ioctl(s, FIONREAD, &len) == -1) 371 iderror(0, 0, s, errno); 372 if (len >= sizeof(buf)) 373 len = sizeof(buf) - 1; 374 len = read(s, buf, len); 375 if (len == -1) 376 iderror(0, 0, s, errno); 377 buf[len] = '\0'; |
378 if (sscanf(buf, "%hu,%hu", &lport, &fport) != 2) | 378 if (sscanf(buf, "%hu , %hu", &lport, &fport) != 2) |
379 iderror(0, 0, s, 0); 380 if (!rflag) 381 iderror(lport, fport, s, -1); 382 sin[0].sin_port = htons(lport); 383 sin[1].sin_port = htons(fport); 384 len = sizeof(uc); 385 if (sysctlbyname("net.inet.tcp.getcred", &uc, &len, sin, 386 sizeof(sin)) == -1) --- 188 unchanged lines hidden --- | 379 iderror(0, 0, s, 0); 380 if (!rflag) 381 iderror(lport, fport, s, -1); 382 sin[0].sin_port = htons(lport); 383 sin[1].sin_port = htons(fport); 384 len = sizeof(uc); 385 if (sysctlbyname("net.inet.tcp.getcred", &uc, &len, sin, 386 sizeof(sin)) == -1) --- 188 unchanged lines hidden --- |