defs.c (92142) | defs.c (93418) |
---|---|
1/*- 2 * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org> 3 * 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) 1997 Brian Somers <brian@Awfulhak.org> 3 * 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 * $FreeBSD: head/usr.sbin/ppp/defs.c 92142 2002-03-12 16:05:26Z brian $ | 26 * $FreeBSD: head/usr.sbin/ppp/defs.c 93418 2002-03-30 12:30:09Z brian $ |
27 */ 28 29 | 27 */ 28 29 |
30#include <sys/types.h> | 30#include <sys/param.h> |
31#include <netdb.h> 32#include <netinet/in.h> 33#include <arpa/inet.h> 34#include <sys/socket.h> 35 36#include <ctype.h> 37#include <errno.h> | 31#include <netdb.h> 32#include <netinet/in.h> 33#include <arpa/inet.h> 34#include <sys/socket.h> 35 36#include <ctype.h> 37#include <errno.h> |
38#include <stdarg.h> |
|
38#include <stdio.h> 39#include <stdlib.h> 40#include <string.h> | 39#include <stdio.h> 40#include <stdlib.h> 41#include <string.h> |
42#if defined(__FreeBSD__) && !defined(NOKLDLOAD) 43#include <sys/linker.h> 44#include <sys/module.h> 45#endif |
|
41#include <termios.h> 42#if !defined(__FreeBSD__) || __FreeBSD__ < 3 43#include <time.h> 44#endif 45#include <unistd.h> 46 | 46#include <termios.h> 47#if !defined(__FreeBSD__) || __FreeBSD__ < 3 48#include <time.h> 49#endif 50#include <unistd.h> 51 |
52#if defined(__FreeBSD__) && !defined(NOKLDLOAD) 53#include "id.h" 54#include "log.h" 55#endif |
|
47#include "defs.h" 48 49#define issep(c) ((c) == '\t' || (c) == ' ') 50 51#if defined(__NetBSD__) || __FreeBSD__ < 3 52void 53randinit() 54{ --- 350 unchanged lines hidden (view full) --- 405 if (n < 0) { 406 buf[pos] = '\0'; 407 break; 408 } 409 if ((pos += n) >= sz) 410 break; 411 } 412} | 56#include "defs.h" 57 58#define issep(c) ((c) == '\t' || (c) == ' ') 59 60#if defined(__NetBSD__) || __FreeBSD__ < 3 61void 62randinit() 63{ --- 350 unchanged lines hidden (view full) --- 414 if (n < 0) { 415 buf[pos] = '\0'; 416 break; 417 } 418 if ((pos += n) >= sz) 419 break; 420 } 421} |
422 423void 424loadmodules(int how, const char *module, ...) 425{ 426#if defined(__FreeBSD__) && !defined(NOKLDLOAD) 427 va_list ap; 428 429 va_start(ap, module); 430 while (module != NULL) { 431 if (modfind(module) == -1 && ID0kldload(module) == -1 && 432 how == LOAD_VERBOSLY) 433 log_Printf(LogWARN, "%s: Cannot load module\n", module); 434 module = va_arg(ap, const char *); 435 } 436 va_end(ap); 437#endif 438} |
|