More trailing white space.
This commit is contained in:
parent
6bf3aa19f9
commit
3f777e28cc
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ex1.c,v 1.2 1998/01/09 04:12:01 perry Exp $ */
|
||||
/* $NetBSD: ex1.c,v 1.3 1999/07/02 16:11:13 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -49,7 +49,7 @@ static char sccsid[] = "@(#)ex1.c 8.1 (Berkeley) 6/4/93";
|
|||
#include <signal.h>
|
||||
|
||||
|
||||
#define YSIZE 10
|
||||
#define YSIZE 10
|
||||
#define XSIZE 20
|
||||
|
||||
int quit();
|
||||
|
@ -67,7 +67,7 @@ main()
|
|||
crmode(); /* We want cbreak mode */
|
||||
noecho(); /* We want to have control of chars */
|
||||
delwin(stdscr); /* Create our own stdscr */
|
||||
stdscr = newwin(YSIZE, XSIZE, 10, 35);
|
||||
stdscr = newwin(YSIZE, XSIZE, 10, 35);
|
||||
flushok(stdscr, TRUE); /* Enable flushing of stdout */
|
||||
scrollok(stdscr, TRUE); /* Enable scrolling */
|
||||
erase(); /* Initially, clear the screen */
|
||||
|
@ -109,6 +109,6 @@ quit()
|
|||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: appen.A,v 1.4 1998/01/09 04:12:03 perry Exp $
|
||||
.\" $NetBSD: appen.A,v 1.5 1999/07/02 16:11:14 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -47,13 +47,13 @@ Here we present a few examples
|
|||
of how to use the package.
|
||||
They attempt to be representative,
|
||||
though not comprehensive. Further examples can be found in the games section
|
||||
of the source tree and in various utilities that use the screen such as
|
||||
of the source tree and in various utilities that use the screen such as
|
||||
.i systat(1) .
|
||||
.pp
|
||||
The following examples are intended to demonstrate
|
||||
the basic structure of a program
|
||||
using the package. An additional, more comprehensive, program can be found in
|
||||
the source code in the
|
||||
the source code in the
|
||||
\fIexamples\fP subdirectory.
|
||||
.sh 2 "Simple Character Output"
|
||||
.pp
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: appen.C,v 1.4 1998/01/09 04:12:04 perry Exp $
|
||||
.\" $NetBSD: appen.C,v 1.5 1999/07/02 16:11:14 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -47,7 +47,7 @@ Here we present a few examples
|
|||
of how to use the package.
|
||||
They attempt to be representative,
|
||||
though not comprehensive. Further examples can be found in the games section
|
||||
of the source tree and in various utilities that use the screen such as
|
||||
of the source tree and in various utilities that use the screen such as
|
||||
.i systat(1) .
|
||||
.sh 2 "Screen Updating"
|
||||
.pp
|
||||
|
@ -71,8 +71,8 @@ chracteristics discussed in the above Character Output section.
|
|||
.)l
|
||||
.sh 3 "A Small Screen Manipulator"
|
||||
.pp
|
||||
The next example follows the lines of the previous one but extends then to
|
||||
demonstrate the various othe uses of the package. Make sure you understand
|
||||
The next example follows the lines of the previous one but extends then to
|
||||
demonstrate the various othe uses of the package. Make sure you understand
|
||||
how this program works as it encompasses most of anything you will
|
||||
need to do with the package.
|
||||
.(l I
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: ex1.c,v 1.4 1998/01/09 04:12:08 perry Exp $
|
||||
.\" $NetBSD: ex1.c,v 1.5 1999/07/02 16:11:14 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1992, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -39,7 +39,7 @@
|
|||
#include <signal.h>
|
||||
|
||||
|
||||
#define YSIZE 10
|
||||
#define YSIZE 10
|
||||
#define XSIZE 20
|
||||
|
||||
int quit();
|
||||
|
@ -57,7 +57,7 @@ main()
|
|||
crmode(); /* We want cbreak mode */
|
||||
noecho(); /* We want to have control of chars */
|
||||
delwin(stdscr); /* Create our own stdscr */
|
||||
stdscr = newwin(YSIZE, XSIZE, 10, 35);
|
||||
stdscr = newwin(YSIZE, XSIZE, 10, 35);
|
||||
flushok(stdscr, TRUE); /* Enable flushing of stdout */
|
||||
scrollok(stdscr, TRUE); /* Enable scrolling */
|
||||
erase(); /* Initially, clear the screen */
|
||||
|
@ -99,6 +99,6 @@ quit()
|
|||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: ex2.c,v 1.5 1998/01/09 04:12:09 perry Exp $
|
||||
.\" $NetBSD: ex2.c,v 1.6 1999/07/02 16:11:15 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1992, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -54,7 +54,7 @@ main()
|
|||
char id[100];
|
||||
int hh = 0;
|
||||
int curx, cury, base, arg;
|
||||
|
||||
|
||||
initscr();
|
||||
signal(SIGINT, quit);
|
||||
crmode();
|
||||
|
@ -183,7 +183,7 @@ main()
|
|||
insertln();
|
||||
(void)snprintf(id, sizeof id, "%d: ", base);
|
||||
addstr(id);
|
||||
for (j = 0; j < XSIZE - strlen(id) - 2; j++)
|
||||
for (j = 0; j < XSIZE - strlen(id) - 2; j++)
|
||||
addch('0' + (base % 10));
|
||||
cury++;
|
||||
} else if (cury >= YSIZE) {
|
||||
|
|
|
@ -68,7 +68,7 @@ In this case, it will put on as much as it can.
|
|||
.De
|
||||
Add no more than
|
||||
.Vn len
|
||||
characters of the string pointed to by
|
||||
characters of the string pointed to by
|
||||
.Vn str
|
||||
on the window at the current \*y.
|
||||
\*(Es
|
||||
|
@ -82,7 +82,7 @@ Remove character attributes set by
|
|||
To clear all character attributes, use
|
||||
.Fn attroff "A_ATTRIBUTES" .
|
||||
.Fn attroff "A_UNDERLINE"
|
||||
is equivalent to
|
||||
is equivalent to
|
||||
.Fn underend .
|
||||
.Ds
|
||||
.Fn attron "int attribute" \(dg
|
||||
|
@ -93,7 +93,7 @@ The attributes that can be set are \fBA_UNDERLINE\fR,
|
|||
\fBA_REVERSE\fR, \fBA_BLINK\fR, \fBA_DIM\fR,
|
||||
\fBA_BOLD\fR, \fBA_BLANK\fR and \fBA_PROTECT\fB.
|
||||
.Fn attron "A_UNDERLINE"
|
||||
is equivalent to
|
||||
is equivalent to
|
||||
.Fn underscore .
|
||||
.Ds
|
||||
.Fn attrset "int attribute" \(dg
|
||||
|
@ -189,7 +189,7 @@ Wipes the window clear from the current \*y to the end of the line.
|
|||
.Ds
|
||||
.Fn crmode "" \(dg
|
||||
.De
|
||||
Identical to
|
||||
Identical to
|
||||
.Fn cbreak .
|
||||
The misnamed macro
|
||||
.Fn crmode
|
||||
|
@ -240,7 +240,7 @@ This restores the terminal to the state it was before
|
|||
and
|
||||
.Fn setterm )
|
||||
was called.
|
||||
It should always be called before exiting and before the final calls to
|
||||
It should always be called before exiting and before the final calls to
|
||||
.Fn delwin .
|
||||
It does not exit.
|
||||
This is especially useful for resetting tty stats
|
||||
|
@ -447,7 +447,7 @@ the cursor will be left after the last update on the terminal,
|
|||
and the current \*y for
|
||||
.Vn win
|
||||
will be changed accordingly.
|
||||
If
|
||||
If
|
||||
.Vn boolf
|
||||
is 0 the cursor will be moved to the current \*y.
|
||||
This flag
|
||||
|
@ -486,7 +486,7 @@ Equivalent to:
|
|||
move(y, x);
|
||||
printw(fmt, ...);
|
||||
.)l
|
||||
.Ds
|
||||
.Ds
|
||||
.Fn mvscanw "int y" "int x" "const char *fmt" "..."
|
||||
.De
|
||||
Equivalent to:
|
||||
|
@ -529,7 +529,7 @@ scanw(fmt, ...);
|
|||
.)l
|
||||
.Ds
|
||||
.Ft "WINDOW *"
|
||||
.Fn newwin "int lines" "int cols" "int begin_y" "int begin_x"
|
||||
.Fn newwin "int lines" "int cols" "int begin_y" "int begin_x"
|
||||
.De
|
||||
Create a new window with
|
||||
.Vn lines
|
||||
|
@ -600,13 +600,13 @@ Turn echoing of characters off.
|
|||
.Ds
|
||||
.Fn nonl "" \(dg
|
||||
.De
|
||||
Unset the terminal to from nl mode. See
|
||||
Unset the terminal to from nl mode. See
|
||||
.Fn nl .
|
||||
.ne 1i
|
||||
.Ds
|
||||
.Fn noraw "" \(dg
|
||||
.De
|
||||
Unset the terminal from raw mode. See
|
||||
Unset the terminal from raw mode. See
|
||||
.Fn raw .
|
||||
.Ds
|
||||
.Fn notimeout "WINDOW *win1" "int boolf"
|
||||
|
@ -645,7 +645,7 @@ i.e., blanks on
|
|||
.Vn win1
|
||||
leave the contents of the space on
|
||||
.Vn win2
|
||||
untouched. Note that all non-blank characters are overwritten
|
||||
untouched. Note that all non-blank characters are overwritten
|
||||
destructively in the overlay.
|
||||
.Ds
|
||||
.Fn overwrite "WINDOW *win1" "WINDOW *win2"
|
||||
|
@ -722,7 +722,7 @@ stored.
|
|||
These functions are performed automatically by
|
||||
.Fn initscr
|
||||
and
|
||||
.Fn endwin .
|
||||
.Fn endwin .
|
||||
This function should not be used by the user.
|
||||
.Ds
|
||||
.Fn savetty "" \(dg
|
||||
|
@ -738,7 +738,7 @@ Perform a
|
|||
.Fn scanf
|
||||
through the window using
|
||||
.Vn fmt .
|
||||
It does this using consecutive calls to
|
||||
It does this using consecutive calls to
|
||||
.Fn getch
|
||||
(or
|
||||
.Fn wgetch ).
|
||||
|
@ -879,12 +879,12 @@ to trap to this routine.
|
|||
.Fn unctrl "char *ch" \(dg
|
||||
.De
|
||||
Returns a string which is an ASCII representation of
|
||||
.Vn ch .
|
||||
.Vn ch .
|
||||
Characters are 8 bits long.
|
||||
.Ds
|
||||
.Fn unctrllen "char *ch" \(dg
|
||||
.De
|
||||
Returns the length of the ASCII representation of
|
||||
Returns the length of the ASCII representation of
|
||||
.Vn ch .
|
||||
.ne 1i
|
||||
.Ds
|
||||
|
@ -905,21 +905,21 @@ This is equivalent to
|
|||
.Ds
|
||||
.Fn vwprintw "WINDOW *win" "const char *fmt" "va_list ap"
|
||||
.De
|
||||
Identical to
|
||||
.Fn printw
|
||||
Identical to
|
||||
.Fn printw
|
||||
except that it takes both a window specification and a pointer to a variable
|
||||
length argument list.
|
||||
.Ds
|
||||
.Fn vwscanw "WINDOW *win" "const char *fmt" "va_list ap"
|
||||
.De
|
||||
Identical to
|
||||
Identical to
|
||||
.Fn scanw
|
||||
except that it takes both a window specification and a pointer to a variable
|
||||
length argument list.
|
||||
.Ds
|
||||
.Fn waddbytes "WINDOW *win" "char *str" "int len"
|
||||
.De
|
||||
This function is the low level character output function.
|
||||
This function is the low level character output function.
|
||||
.Vn Len
|
||||
characters of the string
|
||||
.Vn str
|
||||
|
@ -927,34 +927,34 @@ are output to the current \*y position of the window specified by
|
|||
.Vn win.
|
||||
.sp 2
|
||||
.pp
|
||||
\fIThe following functions differ from the standard functions only in their
|
||||
\fIThe following functions differ from the standard functions only in their
|
||||
specification of a window, rather than the use of the default
|
||||
.Vn stdscr.\fP
|
||||
.Ds
|
||||
.Fn waddch "WINDOW *win" "char ch"
|
||||
.Fn waddstr "WINDOW *win" "char *str"
|
||||
.Fn waddch "WINDOW *win" "char ch"
|
||||
.Fn waddstr "WINDOW *win" "char *str"
|
||||
.Fn waddnstr "WINDOW *win" "char *str" "int len"
|
||||
.Fn wattron "WINDOW *win" "int attr"
|
||||
.Fn wattroff "WINDOW *win" "int attr"
|
||||
.Fn wattrset "WINDOW *win" "int attr"
|
||||
.Fn wclear "WINDOW *win"
|
||||
.Fn wclrtobot "WINDOW *win"
|
||||
.Fn wclrtoeol "WINDOW *win"
|
||||
.Fn wdelch "WINDOW *win"
|
||||
.Fn wdeleteln "WINDOW *win"
|
||||
.Fn werase "WINDOW *win"
|
||||
.Fn wgetch "WINDOW *win"
|
||||
.Fn wgetstr "WINDOW *win" "char *str"
|
||||
.Fn wclear "WINDOW *win"
|
||||
.Fn wclrtobot "WINDOW *win"
|
||||
.Fn wclrtoeol "WINDOW *win"
|
||||
.Fn wdelch "WINDOW *win"
|
||||
.Fn wdeleteln "WINDOW *win"
|
||||
.Fn werase "WINDOW *win"
|
||||
.Fn wgetch "WINDOW *win"
|
||||
.Fn wgetstr "WINDOW *win" "char *str"
|
||||
.Fn winch "WINDOW *win" \(dg
|
||||
.Fn winsch "WINDOW *win" "char c"
|
||||
.Fn winsertln "WINDOW *win"
|
||||
.Fn wmove "WINDOW *win" "int y" int x"
|
||||
.Fn wprintw "WINDOW *win" "char *fmt" "..."
|
||||
.Fn wrefresh "WINDOW *win"
|
||||
.Fn wscanw "WINDOW *win" "char *fmt" "..."
|
||||
.Fn wstandend "WINDOW *win"
|
||||
.Fn winsch "WINDOW *win" "char c"
|
||||
.Fn winsertln "WINDOW *win"
|
||||
.Fn wmove "WINDOW *win" "int y" int x"
|
||||
.Fn wprintw "WINDOW *win" "char *fmt" "..."
|
||||
.Fn wrefresh "WINDOW *win"
|
||||
.Fn wscanw "WINDOW *win" "char *fmt" "..."
|
||||
.Fn wstandend "WINDOW *win"
|
||||
.Fn wstandout "WINDOW *win"
|
||||
.Fn wtimeout "WINDOW *win" "int delay"
|
||||
.Fn wunderend "WINDOW *win"
|
||||
.Fn wunderend "WINDOW *win"
|
||||
.Fn wunderscore "WINDOW *win"
|
||||
.Dg
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: intro.0,v 1.4 1998/01/09 04:12:10 perry Exp $
|
||||
.\" $NetBSD: intro.0,v 1.5 1999/07/02 16:11:15 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -98,8 +98,8 @@ also greatly appreciated.
|
|||
.i "Ken Arnold 16 April 1986"
|
||||
.pp
|
||||
The help and/or support of Kirk McKusick and Keith Bostic (public vi!)
|
||||
was invaluable in bringing the package ``into the 90's'', which now
|
||||
includes completely new data structures and screen refresh optimization
|
||||
was invaluable in bringing the package ``into the 90's'', which now
|
||||
includes completely new data structures and screen refresh optimization
|
||||
routines.
|
||||
.i "Elan Amir 29 December 1992"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: intro.1,v 1.5 1998/08/29 08:32:44 lukem Exp $
|
||||
.\" $NetBSD: intro.1,v 1.6 1999/07/02 16:11:15 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -165,7 +165,7 @@ As hinted above,
|
|||
the routines can use several windows,
|
||||
but two are always available:
|
||||
.Vn curscr ,
|
||||
which is the image of what the terminal looks like at present,
|
||||
which is the image of what the terminal looks like at present,
|
||||
and
|
||||
.Vn stdscr ,
|
||||
which is the image of what the programmer wants the terminal to look like next.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: intro.3,v 1.5 1998/08/29 08:32:44 lukem Exp $
|
||||
.\" $NetBSD: intro.3,v 1.6 1999/07/02 16:11:15 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -38,7 +38,7 @@
|
|||
This is a description of how to actually use the screen package.
|
||||
For simplicity, we assume all updating, reading, etc.
|
||||
is applied to
|
||||
.Vn stdscr ,
|
||||
.Vn stdscr ,
|
||||
although a different window can of course be specified.
|
||||
.sh 2 "Initialization"
|
||||
.pp
|
||||
|
@ -77,7 +77,7 @@ and
|
|||
should be called after
|
||||
.Fn initscr .
|
||||
.pp
|
||||
After the initial window allocation done by
|
||||
After the initial window allocation done by
|
||||
.Fn initscr ,
|
||||
specific window characteristics can be set.
|
||||
Scrolling can be enabled by calling
|
||||
|
@ -97,11 +97,11 @@ The variables
|
|||
.Vn LINES
|
||||
and
|
||||
.Vn COLS
|
||||
control the size of the terminal. They are initially implicitly set by
|
||||
control the size of the terminal. They are initially implicitly set by
|
||||
.Fn initscr ,
|
||||
but can be altered explicitly by the user followed by a call to
|
||||
but can be altered explicitly by the user followed by a call to
|
||||
.Fn initscr .
|
||||
Note that any call to
|
||||
Note that any call to
|
||||
.Fn initscr ,
|
||||
will always delete any existing
|
||||
.Vn stdscr
|
||||
|
@ -131,7 +131,7 @@ As mentioned above, you can combine the two into
|
|||
.Fn mvaddch
|
||||
to do both things in one call.
|
||||
.pp
|
||||
The other output functions
|
||||
The other output functions
|
||||
(such as
|
||||
.Fn addstr
|
||||
and
|
||||
|
@ -141,7 +141,7 @@ all call
|
|||
to add characters to the window.
|
||||
.pp
|
||||
After a change has been made to the window,
|
||||
you must call
|
||||
you must call
|
||||
.Fn refresh .
|
||||
when you want the portion of the terminal covered by the window
|
||||
to reflect the change.
|
||||
|
@ -169,7 +169,7 @@ If you call
|
|||
.Fn wrefresh
|
||||
with
|
||||
.Vn curscr ,
|
||||
it will make the screen look like the image of
|
||||
it will make the screen look like the image of
|
||||
.Vn curscr .
|
||||
This is useful for implementing a command
|
||||
which would redraw the screen in case it got messed up.
|
||||
|
@ -195,7 +195,7 @@ and then reads in the character.
|
|||
.sh 2 "Termination"
|
||||
.pp
|
||||
In order to perform certain optimizations,
|
||||
and,
|
||||
and,
|
||||
on some terminals,
|
||||
to work at all,
|
||||
some things must be done
|
||||
|
@ -214,16 +214,16 @@ It restores tty modes to what they were
|
|||
when
|
||||
.Fn initscr
|
||||
was first called.
|
||||
The terminal state module uses the variable
|
||||
The terminal state module uses the variable
|
||||
.Vn curses_termios
|
||||
to save the original terminal state which is then restored upon a call to
|
||||
to save the original terminal state which is then restored upon a call to
|
||||
.Fn endwin .
|
||||
Thus,
|
||||
anytime after the call to initscr,
|
||||
.Fn endwin
|
||||
should be called before exiting. Note however, that
|
||||
.Fn endwin
|
||||
should always be called
|
||||
should be called before exiting. Note however, that
|
||||
.Fn endwin
|
||||
should always be called
|
||||
.b before
|
||||
the final calls to
|
||||
.Fn delwin ,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: intro.5,v 1.4 1998/01/09 04:12:14 perry Exp $
|
||||
.\" $NetBSD: intro.5,v 1.5 1999/07/02 16:11:15 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -36,12 +36,12 @@
|
|||
.sh 1 "Character Output and Scrolling"
|
||||
.pp
|
||||
The character output policy deals with the following problems. First,
|
||||
where is the location of the cursor after a character is printed, and
|
||||
where is the location of the cursor after a character is printed, and
|
||||
secondly, when does the screen scroll if scrolling is enabled.
|
||||
.pp
|
||||
In the normal case the characters are output as expected, with the cursor
|
||||
In the normal case the characters are output as expected, with the cursor
|
||||
occupying the position of the next character to be output. However, when the
|
||||
cursor is on the last column of the line, the cursor will remain on that
|
||||
cursor is on the last column of the line, the cursor will remain on that
|
||||
position after the last character on the line is output and will only assume
|
||||
the position on the next line when the next character (the first on the next
|
||||
line) is output.
|
||||
|
@ -51,39 +51,39 @@ first character on he first line past the bottom line of the window is
|
|||
output. If scrolling is not enabled the chracters will to be output to the
|
||||
bottom right corner of the window which is the cursor location.
|
||||
.pp
|
||||
This policy allows consistent behavior of the cursor at the boundary
|
||||
This policy allows consistent behavior of the cursor at the boundary
|
||||
conditions. Furthermore, it prevents a scroll from happening before it is
|
||||
actually needed (the old package used to scroll when the bottom right position
|
||||
was output a character). As a precendent, it models the
|
||||
was output a character). As a precendent, it models the
|
||||
.i xterm
|
||||
character output conventions.
|
||||
.sh 1 "Terminal State Handling"
|
||||
.pp
|
||||
The variable
|
||||
.Vn curses_termios
|
||||
contains the terminal state of the terminal. Certain historical routines
|
||||
contains the terminal state of the terminal. Certain historical routines
|
||||
return information:
|
||||
.Fn baudrate ,
|
||||
.Fn baudrate ,
|
||||
.Fn erasechar ,
|
||||
.Fn killchar ,
|
||||
and
|
||||
and
|
||||
.Fn ospeed .
|
||||
These routines are obsolete and exist only for backward compatibility. If
|
||||
you wish to use the information in the
|
||||
you wish to use the information in the
|
||||
.Vn curses_termios
|
||||
structure, you should use the
|
||||
\fItsetattr\fP(3)
|
||||
\fItsetattr\fP(3)
|
||||
routines.
|
||||
.sh 1 "Subwindows"
|
||||
.pp
|
||||
Subwindows are windows which do not have an independent text structure,
|
||||
.i i.e. ,
|
||||
Subwindows are windows which do not have an independent text structure,
|
||||
.i i.e. ,
|
||||
they are windows whose text is a subset of the text of a larger window: the
|
||||
.i parent
|
||||
.i parent
|
||||
window. One consequence of this is that changes to either the parent or the
|
||||
child window are destructive to the other,
|
||||
.i i.e. ,
|
||||
a change to the subwindow is also a change to the parent window and a change
|
||||
to the parent window in the region defined by the subwindow is implicitly a
|
||||
child window are destructive to the other,
|
||||
.i i.e. ,
|
||||
a change to the subwindow is also a change to the parent window and a change
|
||||
to the parent window in the region defined by the subwindow is implicitly a
|
||||
change to the subwindow as well.
|
||||
Apart from this detail, subwindows function like any other window.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: life.c,v 1.4 1998/01/09 04:12:15 perry Exp $
|
||||
.\" $NetBSD: life.c,v 1.5 1999/07/02 16:11:15 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -130,7 +130,7 @@ getstart()
|
|||
|
||||
if (Head != NULL) /* start new list */
|
||||
dellist(Head);
|
||||
Head = malloc(sizeof (LIST));
|
||||
Head = malloc(sizeof (LIST));
|
||||
|
||||
/*
|
||||
* loop through the screen looking for 'x's, and add a list
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: macros,v 1.4 1998/01/09 04:12:16 perry Exp $
|
||||
.\" $NetBSD: macros,v 1.5 1999/07/02 16:11:15 simonb Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -36,7 +36,7 @@
|
|||
.\" this is the uncommented version. The commented one is in "macros.coms"
|
||||
.ie t .ds _ \d\(mi\u
|
||||
.el .ds _ _
|
||||
.ds , ,\
|
||||
.ds , ,\
|
||||
.ds y (y\*,x) co-ordinates
|
||||
.ds db database
|
||||
.ie n .ds f \fI
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
|
@ -13,7 +13,7 @@
|
|||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("@(#) ipsec_policy.c $Revision: 1.1 $");
|
||||
__RCSID("@(#) ipsec_policy.c $Revision: 1.2 $");
|
||||
|
||||
/*
|
||||
* The following requests are accepted:
|
||||
|
@ -359,7 +359,7 @@ static char *parse_policy(struct pbuf *pbuf, char *p)
|
|||
/* update length */
|
||||
if (policy)
|
||||
policy->sadb_x_policy_len = PFKEY_UNIT64(pbuf->off);
|
||||
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -648,7 +648,7 @@ char *ipsec_dump_policy(char *policy, char *delimiter)
|
|||
strcat(buf, "/");
|
||||
strcat(buf, tmp);
|
||||
}
|
||||
|
||||
|
||||
xtlen -= xisr->sadb_x_ipsecrequest_len;
|
||||
xisr = (struct sadb_x_ipsecrequest *)((caddr_t)xisr
|
||||
+ xisr->sadb_x_ipsecrequest_len);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
|
@ -12,7 +12,7 @@
|
|||
.\" 3. Neither the name of the project nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\"
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
|
@ -25,18 +25,18 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: ipsec_set_policy.3,v 1.1 1999/07/01 20:15:28 itojun Exp $
|
||||
.\" $Id: ipsec_set_policy.3,v 1.2 1999/07/02 16:17:44 simonb Exp $
|
||||
.\"
|
||||
.Dd May 5, 1998
|
||||
.Dt IPSEC_SET_POLICY 3
|
||||
.Os KAME
|
||||
.\"
|
||||
.\"
|
||||
.Sh NAME
|
||||
.Nm ipsec_set_policy ,
|
||||
.Nm ipsec_get_policylen ,
|
||||
.Nm ipsec_dump_policy
|
||||
.Nd manipulate IPsec policy specification structure from readable string
|
||||
.\"
|
||||
.\"
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <netinet6/ipsec.h>
|
||||
.Ft int
|
||||
|
@ -45,7 +45,7 @@
|
|||
.Fn ipsec_get_policylen "char *policy"
|
||||
.Ft "char *"
|
||||
.Fn ipsec_dump_policy "char *buf" "char *delim"
|
||||
.\"
|
||||
.\"
|
||||
.Sh DESCRIPTION
|
||||
.Fn ipsec_set_policy
|
||||
generates IPsec policy specification structure, namely
|
||||
|
@ -126,7 +126,7 @@ is either
|
|||
or
|
||||
.Li ipcomp .
|
||||
.Ar level
|
||||
must be set to one of the following:
|
||||
must be set to one of the following:
|
||||
.Li default , use
|
||||
or
|
||||
.Li require .
|
||||
|
@ -147,7 +147,7 @@ or encrypted
|
|||
means that a relevant SA is required,
|
||||
since the kernel must perform IPsec operation against packets.
|
||||
.Ar peer
|
||||
is an IPv4 or IPv6 address string, and it will be used as
|
||||
is an IPv4 or IPv6 address string, and it will be used as
|
||||
a hint when IPsec system configures IPsec tunnel mode SA by using
|
||||
key management protocol.
|
||||
.Pp
|
||||
|
@ -172,7 +172,7 @@ ipsec ah/use/10.1.1.1
|
|||
ipsec esp/use ah/require
|
||||
ipsec ipcomp/use esp/use ah/require
|
||||
.Ed
|
||||
.\"
|
||||
.\"
|
||||
.Sh RETURN VALUES
|
||||
.Fn ipsec_set_policy
|
||||
returns with 0 on success, negative value on errors.
|
||||
|
@ -185,11 +185,11 @@ returns a pointer to dynamically allocated region on success,
|
|||
and
|
||||
.Dv NULL
|
||||
on errors.
|
||||
.\"
|
||||
.\"
|
||||
.Sh SEE ALSO
|
||||
.Xr ipsec_strerror 3 ,
|
||||
.Xr setkey 8
|
||||
.\"
|
||||
.\"
|
||||
.Sh HISTORY
|
||||
The functions first appeared in WIDE/KAME IPv6 protocol stack kit.
|
||||
.\"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
|
@ -12,7 +12,7 @@
|
|||
.\" 3. Neither the name of the project nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\"
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
|
@ -25,21 +25,21 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: ipsec_strerror.3,v 1.1 1999/07/01 20:15:28 itojun Exp $
|
||||
.\" $Id: ipsec_strerror.3,v 1.2 1999/07/02 16:17:44 simonb Exp $
|
||||
.\"
|
||||
.Dd May 6, 1998
|
||||
.Dt IPSEC_STRERROR 3
|
||||
.Os KAME
|
||||
.\"
|
||||
.\"
|
||||
.Sh NAME
|
||||
.Nm ipsec_strerror
|
||||
.Nd error code for IPsec policy manipulation library
|
||||
.\"
|
||||
.\"
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <netinet6/ipsec.h>
|
||||
.Ft "char *"
|
||||
.Fn ipsec_strerror "int code"
|
||||
.\"
|
||||
.\"
|
||||
.Sh DESCRIPTION
|
||||
.Pa netinet6/ipsec.h
|
||||
declares
|
||||
|
@ -50,14 +50,14 @@ which is used to pass error code from IPsec policy manipulation library
|
|||
to user program.
|
||||
.Fn ipsec_strerror
|
||||
can be used to obtain error message string for the error code.
|
||||
.\"
|
||||
.\"
|
||||
.Sh RETURN VALUES
|
||||
.Fn ipsec_strerror
|
||||
always return a pointer to C string.
|
||||
The C string must not be overwritten by user programs.
|
||||
.\"
|
||||
.\"
|
||||
.\" .Sh SEE ALSO
|
||||
.\"
|
||||
.\"
|
||||
.Sh HISTORY
|
||||
The functions first appeared in WIDE/KAME IPv6 protocol stack kit.
|
||||
.\"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
|
@ -13,7 +13,7 @@
|
|||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
|
@ -13,7 +13,7 @@
|
|||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
|
@ -13,7 +13,7 @@
|
|||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("@(#) pfkey.c $Revision: 1.1 $");
|
||||
__RCSID("@(#) pfkey.c $Revision: 1.2 $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -475,7 +475,7 @@ int pfkey_send_getspi(
|
|||
|
||||
/*
|
||||
* sending SADB_UPDATE message to the kernel.
|
||||
* The length of key material is a_keylen + e_keylen.
|
||||
* The length of key material is a_keylen + e_keylen.
|
||||
* OUT:
|
||||
* positive: success and return length sent.
|
||||
* -1 : error occured, and set errno.
|
||||
|
@ -514,7 +514,7 @@ int pfkey_send_update(
|
|||
|
||||
/*
|
||||
* sending SADB_ADD message to the kernel.
|
||||
* The length of key material is a_keylen + e_keylen.
|
||||
* The length of key material is a_keylen + e_keylen.
|
||||
* OUT:
|
||||
* positive: success and return length sent.
|
||||
* -1 : error occured, and set errno.
|
||||
|
@ -553,7 +553,7 @@ int pfkey_send_add(
|
|||
|
||||
/*
|
||||
* sending SADB_DELETE message to the kernel.
|
||||
* The length of key material is a_keylen + e_keylen.
|
||||
* The length of key material is a_keylen + e_keylen.
|
||||
* OUT:
|
||||
* positive: success and return length sent.
|
||||
* -1 : error occured, and set errno.
|
||||
|
@ -578,7 +578,7 @@ int pfkey_send_delete(
|
|||
|
||||
/*
|
||||
* sending SADB_GET message to the kernel.
|
||||
* The length of key material is a_keylen + e_keylen.
|
||||
* The length of key material is a_keylen + e_keylen.
|
||||
* OUT:
|
||||
* positive: success and return length sent.
|
||||
* -1 : error occured, and set errno.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
|
@ -13,7 +13,7 @@
|
|||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $NetBSD: COPYRIGHT,v 1.4 1998/08/12 14:11:49 christos Exp $ -->
|
||||
<!-- $NetBSD: COPYRIGHT,v 1.5 1999/07/02 15:58:35 simonb Exp $ -->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
|
||||
<html><head><title>
|
||||
Copyright Notice
|
||||
|
@ -52,9 +52,9 @@ Trimble PARSE support
|
|||
|
||||
<br><li>Steve Clift (clift@ml.csiro.au): OMEGA clock driver
|
||||
|
||||
<br><li><a href="http://www.ee.uct.ac.za/~casey"> Casey Crellin </a>
|
||||
<a href="mailto:casey@csc.co.za"> (casey@csc.co.za) </a>
|
||||
vxWorks (Tornado) port and help with target configuration
|
||||
<br><li><a href="http://www.ee.uct.ac.za/~casey"> Casey Crellin </a>
|
||||
<a href="mailto:casey@csc.co.za"> (casey@csc.co.za) </a>
|
||||
vxWorks (Tornado) port and help with target configuration
|
||||
|
||||
<br><li>Torsten Duwe (duwe@immd4.informatik.uni-erlangen.de) Linux Port
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.6 1998/03/06 18:17:12 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.7 1999/07/02 15:58:35 simonb Exp $
|
||||
|
||||
LIB= ntp
|
||||
SRCS= utvtoa.c uinttoa.c uglydate.c tvtots.c tvtoa.c tstotv.c \
|
||||
|
@ -11,7 +11,7 @@ emalloc.c dolfptoa.c dofptoa.c decodenetnum.c clocktypes.c clocktime.c \
|
|||
calyearstart.c caltontp.c calleapwhen.c caljulian.c buftvtots.c authusekey.c \
|
||||
authreadkeys.c authparity.c authkeys.c authencrypt.c authdes.c authdecrypt.c \
|
||||
auth12crypt.c atouint.c atolfp.c atoint.c adjtime.c a_md5encrypt.c \
|
||||
a_md5decrypt.c a_md512crypt.c
|
||||
a_md5decrypt.c a_md512crypt.c
|
||||
SRCS += version.c
|
||||
|
||||
CPPFLAGS+=-DHAVE_CONFIG_H -I${.CURDIR}/../../usr.sbin/xntp/include
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: a_md512crypt.c,v 1.4 1998/03/06 18:17:12 christos Exp $ */
|
||||
/* $NetBSD: a_md512crypt.c,v 1.5 1999/07/02 15:58:35 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* md5crypt - MD5 based authentication routines
|
||||
|
@ -31,7 +31,7 @@ extern u_int32 authnokey;
|
|||
* a variable amount of encrypted data, multiple of 8 bytes, followed by:
|
||||
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
|
||||
* BLOCK_OCTETS worth of ciphered checksum.
|
||||
*/
|
||||
*/
|
||||
#define NOCRYPT_OCTETS 4
|
||||
#define BLOCK_OCTETS 16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: a_md5decrypt.c,v 1.4 1998/03/06 18:17:12 christos Exp $ */
|
||||
/* $NetBSD: a_md5decrypt.c,v 1.5 1999/07/02 15:58:35 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* md5crypt - MD5 based authentication routines
|
||||
|
@ -27,7 +27,7 @@ extern u_int32 authnokey;
|
|||
* a variable amount of encrypted data, multiple of 8 bytes, followed by:
|
||||
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
|
||||
* BLOCK_OCTETS worth of ciphered checksum.
|
||||
*/
|
||||
*/
|
||||
#define NOCRYPT_OCTETS 4
|
||||
#define BLOCK_OCTETS 16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: a_md5encrypt.c,v 1.4 1998/03/06 18:17:12 christos Exp $ */
|
||||
/* $NetBSD: a_md5encrypt.c,v 1.5 1999/07/02 15:58:35 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* md5crypt - MD5 based authentication routines
|
||||
|
@ -31,7 +31,7 @@ extern u_int32 authnokey;
|
|||
* a variable amount of encrypted data, multiple of 8 bytes, followed by:
|
||||
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
|
||||
* BLOCK_OCTETS worth of ciphered checksum.
|
||||
*/
|
||||
*/
|
||||
#define NOCRYPT_OCTETS 4
|
||||
#define BLOCK_OCTETS 16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atoint.c,v 1.2 1998/01/09 03:15:50 perry Exp $ */
|
||||
/* $NetBSD: atoint.c,v 1.3 1999/07/02 15:58:35 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* atoint - convert an ascii string to a signed long, with error checking
|
||||
|
@ -45,7 +45,7 @@ atoint(str, ival)
|
|||
|
||||
if (isneg)
|
||||
*ival = -u;
|
||||
else
|
||||
else
|
||||
*ival = u;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atolfp.c,v 1.3 1998/03/06 18:17:13 christos Exp $ */
|
||||
/* $NetBSD: atolfp.c,v 1.4 1999/07/02 15:58:35 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* atolfp - convert an ascii string to an l_fp number
|
||||
|
@ -51,12 +51,12 @@ atolfp(str, lfp)
|
|||
*/
|
||||
while (isspace(*cp))
|
||||
cp++;
|
||||
|
||||
|
||||
if (*cp == '-') {
|
||||
cp++;
|
||||
isneg = 1;
|
||||
}
|
||||
|
||||
|
||||
if (*cp == '+')
|
||||
cp++;
|
||||
|
||||
|
@ -72,7 +72,7 @@ atolfp(str, lfp)
|
|||
if (*cp != '\0' && !isspace(*cp)) {
|
||||
if (*cp++ != '.')
|
||||
return 0;
|
||||
|
||||
|
||||
while (ndec < 9 && *cp != '\0'
|
||||
&& (ind = strchr(digits, *cp)) != NULL) {
|
||||
ndec++;
|
||||
|
@ -83,7 +83,7 @@ atolfp(str, lfp)
|
|||
|
||||
while (isdigit(*cp))
|
||||
cp++;
|
||||
|
||||
|
||||
if (*cp != '\0' && !isspace(*cp))
|
||||
return 0;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ atolfp(str, lfp)
|
|||
|
||||
if (isneg)
|
||||
M_NEG(dec_i, dec_f);
|
||||
|
||||
|
||||
lfp->l_ui = dec_i;
|
||||
lfp->l_uf = dec_f;
|
||||
return 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: auth12crypt.c,v 1.3 1998/03/06 18:17:13 christos Exp $ */
|
||||
/* $NetBSD: auth12crypt.c,v 1.4 1999/07/02 15:58:35 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* auth12crypt.c - routines to support two stage NTP encryption
|
||||
|
@ -13,7 +13,7 @@
|
|||
* an 8 byte chunk of data which is encrypted in pass 2
|
||||
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
|
||||
* BLOCK_OCTETS worth of ciphered checksum.
|
||||
*/
|
||||
*/
|
||||
#define NOCRYPT_OCTETS 4
|
||||
#define BLOCK_OCTETS 8
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
/* $NetBSD: authdecrypt.c,v 1.3 1998/03/06 18:17:13 christos Exp $ */
|
||||
/* $NetBSD: authdecrypt.c,v 1.4 1999/07/02 15:58:35 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* authdecrypt - routine to decrypt a packet to see if this guy knows our key.
|
||||
*/
|
||||
#include "ntp_stdlib.h"
|
||||
|
||||
|
||||
/*
|
||||
* For our purposes an NTP packet looks like:
|
||||
*
|
||||
* a variable amount of unencrypted data, multiple of 8 bytes, followed by:
|
||||
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
|
||||
* BLOCK_OCTETS worth of ciphered checksum.
|
||||
*/
|
||||
*/
|
||||
#define NOCRYPT_OCTETS 4
|
||||
#define BLOCK_OCTETS 8
|
||||
|
||||
|
@ -44,7 +44,7 @@ DESauthdecrypt(keyno, pkt, length)
|
|||
u_int32 work[2];
|
||||
|
||||
authdecryptions++;
|
||||
|
||||
|
||||
if (keyno == 0)
|
||||
keys = (u_char *)DESzerodkeys;
|
||||
else {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: authdes.c,v 1.2 1998/01/09 03:15:55 perry Exp $ */
|
||||
/* $NetBSD: authdes.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* authdes.c - dummy encryption routines for destinations outside the USA.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* des -d -k key authdes.c.des authdes.c
|
||||
*
|
||||
* , where key is as above, and rebuild. To restore the distribution
|
||||
* to its exportable state, copy this file to authdes.c .
|
||||
* to its exportable state, copy this file to authdes.c .
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include "ntp_stdlib.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: authencrypt.c,v 1.3 1998/03/06 18:17:13 christos Exp $ */
|
||||
/* $NetBSD: authencrypt.c,v 1.4 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* authencrypt - compute and encrypt the mac field in an NTP packet
|
||||
|
@ -11,7 +11,7 @@
|
|||
* a variable amount of encrypted data, multiple of 8 bytes, followed by:
|
||||
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
|
||||
* BLOCK_OCTETS worth of ciphered checksum.
|
||||
*/
|
||||
*/
|
||||
#define NOCRYPT_OCTETS 4
|
||||
#define BLOCK_OCTETS 8
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: authkeys.c,v 1.4 1998/08/12 14:11:49 christos Exp $ */
|
||||
/* $NetBSD: authkeys.c,v 1.5 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* authkeys.c - routines to manage the storage of authentication keys
|
||||
|
@ -75,7 +75,7 @@ int authnumfreekeys;
|
|||
/*
|
||||
* Size of the key schedule (in u_int32s for fast DES)
|
||||
*/
|
||||
#define KEY_SCHED_SIZE ((128+sizeof(u_int32)-1)/sizeof(u_int32))
|
||||
#define KEY_SCHED_SIZE ((128+sizeof(u_int32)-1)/sizeof(u_int32))
|
||||
|
||||
/*
|
||||
* The zero key, which we always have. Store the permutted key
|
||||
|
@ -209,7 +209,7 @@ authhavekey(keyno)
|
|||
authkeynotfound++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
cache_keyid = sk->keyid;
|
||||
cache_flags = sk->flags;
|
||||
#ifdef MD5
|
||||
|
@ -242,7 +242,7 @@ auth_moremem()
|
|||
sk = (struct savekey *)malloc(MEMINC * sizeof(struct savekey));
|
||||
if (sk == 0)
|
||||
return 0;
|
||||
|
||||
|
||||
for (i = MEMINC; i > 0; i--) {
|
||||
sk->next = authfreekeys;
|
||||
authfreekeys = sk++;
|
||||
|
@ -271,7 +271,7 @@ authtrust(keyno, trust)
|
|||
|
||||
if (sk == 0 && !trust)
|
||||
return;
|
||||
|
||||
|
||||
if (sk != 0) {
|
||||
if (cache_keyid == keyno) {
|
||||
cache_flags = 0;
|
||||
|
@ -417,7 +417,7 @@ MD5auth_setkey(keyno, key)
|
|||
while (sk != 0) {
|
||||
if (keyno == sk->keyid) {
|
||||
strncpy(sk->k.MD5_key, (const char *)key, sizeof(sk->k.MD5_key));
|
||||
if ((sk->keylen = strlen((const char *)key)) >
|
||||
if ((sk->keylen = strlen((const char *)key)) >
|
||||
sizeof(sk->k.MD5_key))
|
||||
sk->keylen = sizeof(sk->k.MD5_key);
|
||||
|
||||
|
@ -455,7 +455,7 @@ MD5auth_setkey(keyno, key)
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* auth_delkeys - delete all known keys, in preparation for rereading
|
||||
* the keys file (presumably)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: authreadkeys.c,v 1.3 1998/03/06 18:17:14 christos Exp $ */
|
||||
/* $NetBSD: authreadkeys.c,v 1.4 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* authreadkeys.c - routines to support the reading of the key file
|
||||
|
@ -49,7 +49,7 @@ nexttok(str)
|
|||
*/
|
||||
while (*cp == ' ' || *cp == '\t')
|
||||
cp++;
|
||||
|
||||
|
||||
/*
|
||||
* Save this and space to end of token
|
||||
*/
|
||||
|
@ -57,19 +57,19 @@ nexttok(str)
|
|||
while (*cp != '\0' && *cp != '\n' && *cp != ' '
|
||||
&& *cp != '\t' && *cp != '#')
|
||||
cp++;
|
||||
|
||||
|
||||
/*
|
||||
* If token length is zero return an error, else set end of
|
||||
* token to zero and return start.
|
||||
*/
|
||||
if (starttok == cp)
|
||||
return 0;
|
||||
|
||||
|
||||
if (*cp == ' ' || *cp == '\t')
|
||||
*cp++ = '\0';
|
||||
else
|
||||
*cp = '\0';
|
||||
|
||||
|
||||
*str = cp;
|
||||
return starttok;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ extern int fclose P((FILE *stream));
|
|||
token = nexttok(&line);
|
||||
if (token == 0)
|
||||
continue;
|
||||
|
||||
|
||||
/*
|
||||
* First is key number. See if it is okay.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: authusekey.c,v 1.3 1998/03/06 18:17:14 christos Exp $ */
|
||||
/* $NetBSD: authusekey.c,v 1.4 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* authusekey - decode a key from ascii and use it
|
||||
|
@ -88,14 +88,14 @@ authusekey(keyno, keytype, str)
|
|||
if (!DESauth_parity(key)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* We can't find a good reason not to use this key.
|
||||
* So use it.
|
||||
*/
|
||||
DESauth_setkey(keyno, key);
|
||||
break;
|
||||
|
||||
|
||||
case KEY_TYPE_ASCII:
|
||||
/*
|
||||
* Make up key from ascii representation
|
||||
|
@ -107,7 +107,7 @@ authusekey(keyno, keytype, str)
|
|||
| (u_int32)keybytes[2] << 8 | (u_int32)keybytes[3];
|
||||
key[1] = (u_int32)keybytes[4] << 24 | (u_int32)keybytes[5] << 16
|
||||
| (u_int32)keybytes[6] << 8 | (u_int32)keybytes[7];
|
||||
|
||||
|
||||
/*
|
||||
* Set parity on key
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: caljulian.c,v 1.3 1998/03/06 18:17:14 christos Exp $ */
|
||||
/* $NetBSD: caljulian.c,v 1.4 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* caljulian - determine the Julian date from an NTP time.
|
||||
|
@ -56,7 +56,7 @@ caljulian(ntptime, jt)
|
|||
minutes = ntptime / SECSPERMIN;
|
||||
jt->minute = minutes % MINSPERHR;
|
||||
jt->hour = (minutes / MINSPERHR) % HRSPERDAY;
|
||||
|
||||
|
||||
/*
|
||||
* Find the day past 1900/01/01 00:00 UTC
|
||||
*/
|
||||
|
@ -100,7 +100,7 @@ caljulian(ntptime, jt)
|
|||
for (jt->month=0;jt->month<11; jt->month++)
|
||||
{
|
||||
int t;
|
||||
|
||||
|
||||
t = monthday - calmonthtab[jt->month];
|
||||
if (jt->month == 1 && is_leapyear(jt->year))
|
||||
t--;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: calleapwhen.c,v 1.2 1998/01/09 03:16:02 perry Exp $ */
|
||||
/* $NetBSD: calleapwhen.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* calleapwhen - determine the number of seconds to the next possible
|
||||
|
@ -54,7 +54,7 @@ calleapwhen(ntpdate, leaplast, leapnext)
|
|||
for (i = 1; i < 9; i++)
|
||||
if (dateincycle < (u_long)calleaptab[i])
|
||||
break;
|
||||
|
||||
|
||||
/*
|
||||
* i points at the next leap. Compute the last and the next.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: caltontp.c,v 1.3 1998/03/06 18:17:14 christos Exp $ */
|
||||
/* $NetBSD: caltontp.c,v 1.4 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* caltontp - convert a date to an NTP time
|
||||
|
@ -17,7 +17,7 @@ caltontp(jt)
|
|||
u_long ntp_days;
|
||||
int prior_years;
|
||||
u_long ntp_time;
|
||||
|
||||
|
||||
/*
|
||||
* First convert today's date to absolute days past 12/1/1 BC
|
||||
*/
|
||||
|
@ -36,7 +36,7 @@ caltontp(jt)
|
|||
/*
|
||||
* Do the obvious:
|
||||
*/
|
||||
ntp_time =
|
||||
ntp_time =
|
||||
ntp_days*SECSPERDAY+SECSPERMIN*(MINSPERHR*jt->hour + jt->minute);
|
||||
|
||||
return ntp_time;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: calyearstart.c,v 1.2 1998/01/09 03:16:03 perry Exp $ */
|
||||
/* $NetBSD: calyearstart.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* calyearstart - determine the NTP time at midnight of January 1 in
|
||||
|
@ -37,7 +37,7 @@ calyearstart(dateinyear)
|
|||
cyclestart = MAR1900;
|
||||
while ((cyclestart + SECSPERCYCLE) <= dateinyear)
|
||||
cyclestart += SECSPERCYCLE;
|
||||
|
||||
|
||||
/*
|
||||
* If we're in the first year of the cycle, January 1 is
|
||||
* two months back from the cyclestart and the year is
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clocktypes.c,v 1.4 1998/08/12 14:11:49 christos Exp $ */
|
||||
/* $NetBSD: clocktypes.c,v 1.5 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Data for pretty printing clock types
|
||||
|
@ -84,7 +84,7 @@ clockname(num)
|
|||
int num;
|
||||
{
|
||||
register struct clktype *clk;
|
||||
|
||||
|
||||
for (clk = clktypes; clk->code != -1; clk++) {
|
||||
if (num == clk->code)
|
||||
return (clk->abbrev);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: decodenetnum.c,v 1.2 1998/01/09 03:16:05 perry Exp $ */
|
||||
/* $NetBSD: decodenetnum.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* decodenetnum - return a net number (this is crude, but careful)
|
||||
|
@ -52,7 +52,7 @@ decodenetnum(num, netnum)
|
|||
*netnum <<= 8;
|
||||
*netnum += temp;
|
||||
}
|
||||
|
||||
|
||||
if (i < 4)
|
||||
return 0;
|
||||
*netnum = htonl(*netnum);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dofptoa.c,v 1.2 1998/01/09 03:16:06 perry Exp $ */
|
||||
/* $NetBSD: dofptoa.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* dofptoa - do the grunge work to convert an fp number to ascii
|
||||
|
@ -74,7 +74,7 @@ dofptoa(fpv, neg, ndec, msec)
|
|||
|
||||
if (dec > 6)
|
||||
dec = 6;
|
||||
|
||||
|
||||
if (dec > 0) {
|
||||
do {
|
||||
val &= 0xffff;
|
||||
|
@ -101,14 +101,14 @@ dofptoa(fpv, neg, ndec, msec)
|
|||
*/
|
||||
while (cp < (cpdec -1) && *cp == 0)
|
||||
cp++;
|
||||
|
||||
|
||||
/*
|
||||
* Copy it into the buffer, asciizing as we go.
|
||||
*/
|
||||
bp = buf;
|
||||
if (neg)
|
||||
*bp++ = '-';
|
||||
|
||||
|
||||
while (cp < cpend) {
|
||||
if (cp == cpdec)
|
||||
*bp++ = '.';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dolfptoa.c,v 1.2 1998/01/09 03:16:07 perry Exp $ */
|
||||
/* $NetBSD: dolfptoa.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* dolfptoa - do the grunge work of converting an l_fp number to decimal
|
||||
|
@ -83,7 +83,7 @@ dolfptoa(fpi, fpv, neg, ndec, msec)
|
|||
}
|
||||
if (dec > 12)
|
||||
dec = 12;
|
||||
|
||||
|
||||
/*
|
||||
* If there's a fraction to deal with, do so.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: findconfig.c,v 1.4 1998/07/06 06:46:34 mrg Exp $ */
|
||||
/* $NetBSD: findconfig.c,v 1.5 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -19,8 +19,8 @@ FindConfig(base)
|
|||
{
|
||||
static char result[BUFSIZ];
|
||||
char hostname[MAXHOSTNAMELEN + 1], *cp;
|
||||
struct stat sbuf;
|
||||
struct utsname unamebuf;
|
||||
struct stat sbuf;
|
||||
struct utsname unamebuf;
|
||||
|
||||
/* All keyed by initial target being a directory */
|
||||
(void) strcpy(result, base);
|
||||
|
@ -55,8 +55,8 @@ FindConfig(base)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
outahere:
|
||||
return(result);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getopt.c,v 1.7 1998/08/12 14:11:49 christos Exp $ */
|
||||
/* $NetBSD: getopt.c,v 1.8 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* getopt - get option letter from argv
|
||||
|
@ -67,7 +67,7 @@ ntp_getopt(argc, argv, optstring)
|
|||
scan = NULL;
|
||||
ntp_optind++;
|
||||
}
|
||||
|
||||
|
||||
if (scan == NULL || *scan == '\0') {
|
||||
if (ntp_optind >= argc
|
||||
|| argv[ntp_optind][0] != '-'
|
||||
|
@ -79,7 +79,7 @@ ntp_getopt(argc, argv, optstring)
|
|||
ntp_optind++;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
scan = argv[ntp_optind++]+1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hextolfp.c,v 1.3 1998/03/06 18:17:15 christos Exp $ */
|
||||
/* $NetBSD: hextolfp.c,v 1.4 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* hextolfp - convert an ascii hex string to an l_fp number
|
||||
|
@ -32,7 +32,7 @@ hextolfp(str, lfp)
|
|||
*/
|
||||
while (isspace(*cp))
|
||||
cp++;
|
||||
|
||||
|
||||
cpstart = cp;
|
||||
while (*cp != '\0' && (cp - cpstart) < 8 &&
|
||||
(ind = strchr(digits, *cp)) != NULL) {
|
||||
|
@ -58,7 +58,7 @@ hextolfp(str, lfp)
|
|||
|
||||
if ((cp - cpstart) < 8 || ind == NULL)
|
||||
return 0;
|
||||
|
||||
|
||||
if (*cp != '\0' && !isspace(*cp))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: humandate.c,v 1.6 1998/08/12 14:11:49 christos Exp $ */
|
||||
/* $NetBSD: humandate.c,v 1.7 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* humandate - convert an NTP (or the current) time to something readable
|
||||
|
@ -35,14 +35,14 @@ humandate(ntptime)
|
|||
time_t sec;
|
||||
|
||||
LIB_GETBUF(bp);
|
||||
|
||||
|
||||
sec = ntptime - JAN_1970;
|
||||
tm = localtime(&sec);
|
||||
|
||||
(void) sprintf(bp, "%s, %s %2d %4d %2d:%02d:%02d",
|
||||
days[tm->tm_wday], months[tm->tm_mon], tm->tm_mday,
|
||||
1900+tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||
|
||||
|
||||
return bp;
|
||||
}
|
||||
|
||||
|
@ -56,12 +56,12 @@ humanlogtime()
|
|||
char *bp;
|
||||
time_t cursec = time((time_t *) 0);
|
||||
struct tm *tm = localtime(&cursec);
|
||||
|
||||
|
||||
LIB_GETBUF(bp);
|
||||
|
||||
|
||||
(void) sprintf(bp, "%2d %s %02d:%02d:%02d",
|
||||
tm->tm_mday, months[tm->tm_mon],
|
||||
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||
|
||||
|
||||
return bp;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machines.c,v 1.4 1998/08/12 14:11:50 christos Exp $ */
|
||||
/* $NetBSD: machines.c,v 1.5 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/* machines.c - provide special support for peculiar architectures
|
||||
*
|
||||
|
@ -61,9 +61,9 @@ struct servent *getservbyname (char *name, char *type)
|
|||
return serv1;
|
||||
}
|
||||
|
||||
/* second
|
||||
/* second
|
||||
* vxworks thinks it has insomnia
|
||||
* we have to sleep for number of seconds
|
||||
* we have to sleep for number of seconds
|
||||
*/
|
||||
|
||||
#define CLKRATE sysClkRateGet()
|
||||
|
@ -78,14 +78,14 @@ struct servent *getservbyname (char *name, char *type)
|
|||
#define USECS_PER_SEC 1000000L /* Microseconds per second */
|
||||
#define TICK (((USECS_PER_SEC / CLKRATE) / CLK_GRANULARITY) * CLK_GRANULARITY)
|
||||
|
||||
/* emulate unix sleep
|
||||
/* emulate unix sleep
|
||||
* casey
|
||||
*/
|
||||
void sleep(int seconds)
|
||||
{
|
||||
taskDelay(seconds*TICK);
|
||||
}
|
||||
/* emulate unix alarm
|
||||
/* emulate unix alarm
|
||||
* that pauses and calls SIGALRM after the seconds are up...
|
||||
* so ... taskDelay() fudged for seconds should amount to the same thing.
|
||||
* casey
|
||||
|
@ -165,7 +165,7 @@ settimeofday(tvp, tzp)
|
|||
|
||||
char * set_tod_using = "SetSystemTime";
|
||||
|
||||
/* Windows NT versions of gettimeofday and settimeofday
|
||||
/* Windows NT versions of gettimeofday and settimeofday
|
||||
*
|
||||
* ftime() has internal DayLightSavings related BUGS
|
||||
* therefore switched to GetSystemTimeAsFileTime()
|
||||
|
@ -202,7 +202,7 @@ settimeofday(tv)
|
|||
struct tm *gmtm;
|
||||
long x = tv->tv_sec;
|
||||
long y = tv->tv_usec;
|
||||
|
||||
|
||||
gmtm = gmtime((const time_t *) &x);
|
||||
st.wSecond = (WORD) gmtm->tm_sec;
|
||||
st.wMinute = (WORD) gmtm->tm_min;
|
||||
|
@ -213,7 +213,7 @@ settimeofday(tv)
|
|||
st.wDayOfWeek = (WORD) gmtm->tm_wday;
|
||||
st.wMilliseconds = (WORD) (y / 1000);
|
||||
|
||||
if (!SetSystemTime(&st)) {
|
||||
if (!SetSystemTime(&st)) {
|
||||
msyslog(LOG_ERR, "SetSystemTime failed: %m\n");
|
||||
return -1;
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ getpass(const char * prompt)
|
|||
int c, i;
|
||||
static char password[32];
|
||||
|
||||
fprintf(stderr, "%s", prompt);
|
||||
fprintf(stderr, "%s", prompt);
|
||||
fflush(stderr);
|
||||
for (i=0; i<sizeof(password)-1 && ((c=_getch())!='\n'); i++) {
|
||||
password[i] = c;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $NetBSD: mexit.c,v 1.2 1998/01/09 03:16:19 perry Exp $ */
|
||||
/* $NetBSD: mexit.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* mexit - Used to exit the XNTPD daemon
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef SYS_WINNT
|
||||
|
@ -21,7 +21,7 @@ int status;
|
|||
ExitThread((DWORD)status);
|
||||
else {
|
||||
/* service mode, need to have the service_main routine
|
||||
* register with the service control manager that the
|
||||
* register with the service control manager that the
|
||||
* service has stopped running, before exiting
|
||||
*/
|
||||
if ((status > 0) && (hServDoneEvent != NULL))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mstolfp.c,v 1.2 1998/01/09 03:16:23 perry Exp $ */
|
||||
/* $NetBSD: mstolfp.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* mstolfp - convert an ascii string in milliseconds to an l_fp number
|
||||
|
@ -34,7 +34,7 @@ mstolfp(str, lfp)
|
|||
cp = str;
|
||||
while (isspace(*cp))
|
||||
cp++;
|
||||
|
||||
|
||||
if (*cp == '-') {
|
||||
*bp++ = '-';
|
||||
cp++;
|
||||
|
@ -83,7 +83,7 @@ mstolfp(str, lfp)
|
|||
*/
|
||||
while (cp < cpdec)
|
||||
*bp++ = (char)*cp++;
|
||||
|
||||
|
||||
if (*cp == '.') {
|
||||
cp++;
|
||||
while (isdigit(*cp))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: msyslog.c,v 1.3 1998/03/06 18:17:15 christos Exp $ */
|
||||
/* $NetBSD: msyslog.c,v 1.4 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* msyslog - either send a message to the terminal or print it on
|
||||
|
@ -122,7 +122,7 @@ void msyslog(va_alist)
|
|||
err = strerror(olderrno);
|
||||
#else /* SYS_WINNT */
|
||||
err = xerr;
|
||||
FormatMessage(
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
GetLastError(),
|
||||
|
@ -151,7 +151,7 @@ void msyslog(va_alist)
|
|||
#else
|
||||
{
|
||||
lpszStrings[0] = buf;
|
||||
|
||||
|
||||
switch (event_type[level])
|
||||
{
|
||||
case EVENTLOG_ERROR_TYPE :
|
||||
|
@ -163,7 +163,7 @@ void msyslog(va_alist)
|
|||
{
|
||||
reportAnIEvent(NTP_INFO,1,lpszStrings);
|
||||
break;
|
||||
}
|
||||
}
|
||||
case EVENTLOG_WARNING_TYPE :
|
||||
{
|
||||
reportAnWEvent(NTP_WARNING,1,lpszStrings);
|
||||
|
@ -171,7 +171,7 @@ void msyslog(va_alist)
|
|||
}
|
||||
} /* switch end */
|
||||
|
||||
}
|
||||
}
|
||||
#endif /* SYS_WINNT */
|
||||
else {
|
||||
#else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* $NetBSD: netof.c,v 1.2 1998/01/09 03:16:25 perry Exp $ */
|
||||
/* $NetBSD: netof.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
/*
|
||||
* netof - return the net address part of an ip address
|
||||
* (zero out host part)
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: numtohost.c,v 1.2 1998/01/09 03:16:27 perry Exp $ */
|
||||
/* $NetBSD: numtohost.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* numtohost - convert network number to host name.
|
||||
|
@ -31,9 +31,9 @@ numtohost(netnum)
|
|||
|| ((hp = gethostbyaddr((char *)&netnum, sizeof netnum, AF_INET))
|
||||
== 0))
|
||||
return numtoa(netnum);
|
||||
|
||||
|
||||
LIB_GETBUF(bp);
|
||||
|
||||
|
||||
bp[LIB_BUFLENGTH-1] = '\0';
|
||||
(void) strncpy(bp, hp->h_name, LIB_BUFLENGTH-1);
|
||||
return bp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: prettydate.c,v 1.3 1998/03/06 18:17:15 christos Exp $ */
|
||||
/* $NetBSD: prettydate.c,v 1.4 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* prettydate - convert a time stamp to something readable
|
||||
|
@ -31,7 +31,7 @@ prettydate(ts)
|
|||
};
|
||||
|
||||
LIB_GETBUF(bp);
|
||||
|
||||
|
||||
sec = ts->l_ui - JAN_1970;
|
||||
msec = ts->l_uf / 4294967; /* fract / (2 ** 32 / 1000) */
|
||||
|
||||
|
@ -41,6 +41,6 @@ prettydate(ts)
|
|||
(u_long)ts->l_ui, (u_long)ts->l_uf, days[tm->tm_wday],
|
||||
months[tm->tm_mon], tm->tm_mday, 1900 + tm->tm_year,
|
||||
tm->tm_hour,tm->tm_min, tm->tm_sec, msec);
|
||||
|
||||
|
||||
return bp;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: refnumtoa.c,v 1.2 1998/01/09 03:16:30 perry Exp $ */
|
||||
/* $NetBSD: refnumtoa.c,v 1.3 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* refnumtoa - return asciized refclock addresses stored in local array space
|
||||
|
@ -16,9 +16,9 @@ refnumtoa(num)
|
|||
register u_int32 netnum;
|
||||
register char *buf;
|
||||
register const char *rclock;
|
||||
|
||||
|
||||
netnum = ntohl(num);
|
||||
|
||||
|
||||
LIB_GETBUF(buf);
|
||||
|
||||
rclock = clockname((int)((u_long)netnum >> 8) & 0xff);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: statestr.c,v 1.4 1998/08/12 14:11:50 christos Exp $ */
|
||||
/* $NetBSD: statestr.c,v 1.5 1999/07/02 15:58:36 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* pretty printing of status information
|
||||
|
@ -179,7 +179,7 @@ statustoa(type, st)
|
|||
(void)strcat(cb, ", ");
|
||||
(void)strcat(cb, getcode(CTL_SYS_EVENT(st), sys_codes));
|
||||
break;
|
||||
|
||||
|
||||
case TYPE_PEER:
|
||||
/*
|
||||
* Handcraft the bits
|
||||
|
@ -215,7 +215,7 @@ statustoa(type, st)
|
|||
peer_codes));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case TYPE_CLOCK:
|
||||
(void)strcpy(cb, getcode(((st)>>8) & 0xff, clock_codes));
|
||||
(void)strcat(cb, ", last_");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: syssignal.c,v 1.2 1998/01/09 03:16:32 perry Exp $ */
|
||||
/* $NetBSD: syssignal.c,v 1.3 1999/07/02 15:58:37 simonb Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -35,7 +35,7 @@ signal_no_reset(sig, func)
|
|||
while (1)
|
||||
{
|
||||
struct sigaction ovec;
|
||||
|
||||
|
||||
n = sigaction(sig, &vec, &ovec);
|
||||
if (n == -1 && errno == EINTR) continue;
|
||||
if (ovec.sa_flags)
|
||||
|
@ -84,7 +84,7 @@ signal_no_reset(sig, func)
|
|||
}
|
||||
}
|
||||
|
||||
#else
|
||||
#else
|
||||
|
||||
/* Beware! This implementation resets the signal to SIG_DFL */
|
||||
void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: systime.c,v 1.3 1998/03/06 18:17:16 christos Exp $ */
|
||||
/* $NetBSD: systime.c,v 1.4 1999/07/02 15:58:37 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* systime -- routines to fiddle a UNIX clock.
|
||||
|
@ -142,13 +142,13 @@ step_systime(now)
|
|||
isneg = 1;
|
||||
} else
|
||||
isneg = 0;
|
||||
#ifdef SLEWALWAYS
|
||||
#ifdef SLEWALWAYS
|
||||
#ifdef STEP_SLEW
|
||||
|
||||
if (tmp_ui >= 3) { /* Step it and slew we might win */
|
||||
n = step_systime_real(now);
|
||||
if (!n) return n;
|
||||
if (isneg)
|
||||
if (isneg)
|
||||
now->l_ui = ~0;
|
||||
else
|
||||
now->l_ui = ~0;
|
||||
|
@ -217,7 +217,7 @@ adj_systime(now)
|
|||
#ifdef DEBUG
|
||||
if (debug > 4)
|
||||
printf("systime: offset %s\n", lfptoa(now, 6));
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* Move the current offset into the registers
|
||||
*/
|
||||
|
@ -333,7 +333,7 @@ adj_systime(now)
|
|||
sys_clock_offset.l_ui = offset_i;
|
||||
sys_clock_offset.l_uf = offset_f;
|
||||
rval = 1;
|
||||
#ifndef SYS_WINNT
|
||||
#ifndef SYS_WINNT
|
||||
if (oadjtv.tv_sec != 0 || oadjtv.tv_usec != 0) {
|
||||
sTVTOTS(&oadjtv, &oadjts);
|
||||
L_ADD(&sys_clock_offset, &oadjts);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: utvtoa.c,v 1.2 1998/01/09 03:16:39 perry Exp $ */
|
||||
/* $NetBSD: utvtoa.c,v 1.3 1999/07/02 15:58:37 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* utvtoa - return an asciized representation of an unsigned struct timeval
|
||||
|
@ -20,7 +20,7 @@ utvtoa(tv)
|
|||
register char *buf;
|
||||
|
||||
LIB_GETBUF(buf);
|
||||
|
||||
|
||||
(void) sprintf(buf, "%lu.%06lu", (u_long)tv->tv_sec,
|
||||
(u_long)tv->tv_usec);
|
||||
return buf;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.18 1999/07/02 10:05:22 itojun Exp $
|
||||
# $NetBSD: Makefile,v 1.19 1999/07/02 16:03:41 simonb Exp $
|
||||
|
||||
LIB= pcap
|
||||
MAN= pcap.3
|
||||
MAN= pcap.3
|
||||
|
||||
LEX= flex
|
||||
|
||||
|
@ -15,12 +15,12 @@ YPREFIX=pcap_
|
|||
YHEADER=1
|
||||
|
||||
SRCS= scanner.l savefile.c pcap.c pcap-bpf.c optimize.c nametoaddr.c \
|
||||
inet.c grammar.y gencode.c etherent.c bpf_image.c
|
||||
inet.c grammar.y gencode.c etherent.c bpf_image.c
|
||||
SRCS+= bpf_filter.c version.c
|
||||
|
||||
.PATH: ${.CURDIR}/../../sys/net
|
||||
|
||||
INCS= pcap-namedb.h pcap.h
|
||||
INCS= pcap-namedb.h pcap.h
|
||||
INCSDIR=/usr/include
|
||||
|
||||
scanner.c: grammar.h
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gencode.c,v 1.13 1999/07/02 10:05:22 itojun Exp $ */
|
||||
/* $NetBSD: gencode.c,v 1.14 1999/07/02 16:03:41 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
|
||||
|
@ -26,7 +26,7 @@
|
|||
static const char rcsid[] =
|
||||
"@(#) Header: gencode.c,v 1.93 97/06/12 14:22:47 leres Exp (LBL)";
|
||||
#else
|
||||
__RCSID("$NetBSD: gencode.c,v 1.13 1999/07/02 10:05:22 itojun Exp $");
|
||||
__RCSID("$NetBSD: gencode.c,v 1.14 1999/07/02 16:03:41 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -104,7 +104,7 @@ bpf_error(fmt, va_alist)
|
|||
va_start(ap);
|
||||
#endif
|
||||
if (bpf_pcap != NULL)
|
||||
(void)vsnprintf(pcap_geterr(bpf_pcap),
|
||||
(void)vsnprintf(pcap_geterr(bpf_pcap),
|
||||
PCAP_ERRBUF_SIZE, fmt, ap);
|
||||
va_end(ap);
|
||||
longjmp(top_ctx, 1);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gencode.h,v 1.6 1999/07/02 10:05:22 itojun Exp $ */
|
||||
/* $NetBSD: gencode.h,v 1.7 1999/07/02 16:03:41 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996
|
||||
|
@ -87,7 +87,7 @@ struct slist {
|
|||
struct slist *next;
|
||||
};
|
||||
|
||||
/*
|
||||
/*
|
||||
* A bit vector to represent definition sets. We assume TOT_REGISTERS
|
||||
* is smaller than 8*sizeof(atomset).
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nametoaddr.c,v 1.10 1999/07/02 10:05:22 itojun Exp $ */
|
||||
/* $NetBSD: nametoaddr.c,v 1.11 1999/07/02 16:03:41 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996
|
||||
|
@ -30,7 +30,7 @@
|
|||
static const char rcsid[] =
|
||||
"@(#) Header: nametoaddr.c,v 1.47 97/06/13 13:16:19 leres Exp (LBL)";
|
||||
#else
|
||||
__RCSID("$NetBSD: nametoaddr.c,v 1.10 1999/07/02 10:05:22 itojun Exp $");
|
||||
__RCSID("$NetBSD: nametoaddr.c,v 1.11 1999/07/02 16:03:41 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -346,7 +346,7 @@ pcap_ether_hostton(const char *name)
|
|||
return (NULL);
|
||||
else
|
||||
rewind(fp);
|
||||
|
||||
|
||||
while ((ep = pcap_next_etherent(fp)) != NULL) {
|
||||
if (strcmp(ep->name, name) == 0) {
|
||||
ap = (u_char *)malloc(6);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: optimize.c,v 1.8 1999/07/02 10:05:22 itojun Exp $ */
|
||||
/* $NetBSD: optimize.c,v 1.9 1999/07/02 16:03:41 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996
|
||||
|
@ -28,7 +28,7 @@
|
|||
static const char rcsid[] =
|
||||
"@(#) Header: optimize.c,v 1.60 96/09/26 23:28:14 leres Exp (LBL)";
|
||||
#else
|
||||
__RCSID("$NetBSD: optimize.c,v 1.8 1999/07/02 10:05:22 itojun Exp $");
|
||||
__RCSID("$NetBSD: optimize.c,v 1.9 1999/07/02 16:03:41 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1147,7 +1147,7 @@ opt_blk(b, do_stmts)
|
|||
* already there, or if this block is a return,
|
||||
* eliminate all the statements.
|
||||
*/
|
||||
if (do_stmts &&
|
||||
if (do_stmts &&
|
||||
((b->out_use == 0 && aval != 0 &&b->val[A_ATOM] == aval) ||
|
||||
BPF_CLASS(b->s.code) == BPF_RET)) {
|
||||
if (b->stmts != 0) {
|
||||
|
@ -2064,12 +2064,12 @@ icode_to_fcode(root, lenp)
|
|||
while (1) {
|
||||
unMarkAll();
|
||||
n = *lenp = count_stmts(root);
|
||||
|
||||
|
||||
fp = (struct bpf_insn *)malloc(sizeof(*fp) * n);
|
||||
memset((char *)fp, 0, sizeof(*fp) * n);
|
||||
fstart = fp;
|
||||
ftail = fp + n;
|
||||
|
||||
|
||||
unMarkAll();
|
||||
if (convert_code_r(root))
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pcap-int.h,v 1.6 1998/09/19 21:44:37 matt Exp $ */
|
||||
/* $NetBSD: pcap-int.h,v 1.7 1999/07/02 16:03:41 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996
|
||||
|
@ -90,7 +90,7 @@ struct pcap {
|
|||
*/
|
||||
u_char *pkt;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Placeholder for filter code if bpf not in kernel.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pcap.c,v 1.6 1998/07/26 14:49:36 mycroft Exp $ */
|
||||
/* $NetBSD: pcap.c,v 1.7 1999/07/02 16:03:41 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994, 1995, 1996
|
||||
|
@ -39,7 +39,7 @@
|
|||
static const char rcsid[] =
|
||||
"@(#) Header: pcap.c,v 1.27 96/11/27 18:43:25 leres Exp (LBL)";
|
||||
#else
|
||||
__RCSID("$NetBSD: pcap.c,v 1.6 1998/07/26 14:49:36 mycroft Exp $");
|
||||
__RCSID("$NetBSD: pcap.c,v 1.7 1999/07/02 16:03:41 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -201,6 +201,6 @@ pcap_close(pcap_t *p)
|
|||
if (p->md.device != NULL)
|
||||
free(p->md.device);
|
||||
#endif
|
||||
|
||||
|
||||
free(p);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/local/bin/perl
|
||||
#
|
||||
# $NetBSD: pcap2netbsd,v 1.4 1998/04/09 00:32:35 tv Exp $
|
||||
# $NetBSD: pcap2netbsd,v 1.5 1999/07/02 16:03:41 simonb Exp $
|
||||
#
|
||||
# Perl script to convert a standard distribution directory for am-utils into
|
||||
# a NetBSD source tree.
|
||||
|
@ -32,7 +32,7 @@ $version = "0.4a3";
|
|||
|
||||
@libpcaphf = ("pcap.h", "pcap-namedb.h");
|
||||
@libpcapmf = ("pcap.3");
|
||||
@libpcapdf = ("CHANGES", "README", "gnuc.h", "pcap-int.h", "gencode.h",
|
||||
@libpcapdf = ("CHANGES", "README", "gnuc.h", "pcap-int.h", "gencode.h",
|
||||
"ethertype.h", "ppp.h");
|
||||
|
||||
# sed edit list: file, sed-program
|
||||
|
@ -159,7 +159,7 @@ sub dumpsrcs {
|
|||
|
||||
#
|
||||
# Main progarm.
|
||||
#
|
||||
#
|
||||
|
||||
$srcdir = $ENV{'SRCDIR'};
|
||||
$targetdir = $ENV{'TARGETDIR'};
|
||||
|
@ -167,9 +167,9 @@ $incdirs = "-I. -I$srcdir/config -I$srcdir";
|
|||
|
||||
if (!$srcdir | !targetdir) {
|
||||
die "You must define the environment variables SRCDIR and TARGETDIR.\n"
|
||||
}
|
||||
}
|
||||
print "Making the NetBSD directory tree.\n";
|
||||
foreach $f (@subdirs) {
|
||||
foreach $f (@subdirs) {
|
||||
print " -->$f\n";
|
||||
makedir ("$targetdir/$f");
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ while ($line = <DATA>) {
|
|||
}
|
||||
print ODATA "$line\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
close (ODATA);
|
||||
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: auth-proto.h,v 1.7 1998/07/27 01:45:09 mycroft Exp $ */
|
||||
/* $NetBSD: auth-proto.h,v 1.8 1999/07/02 16:05:11 simonb Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -42,7 +42,7 @@
|
|||
* to require a specific license from the United States Government.
|
||||
* It is the responsibility of any person or organization contemplating
|
||||
* export to obtain such a license before exporting.
|
||||
*
|
||||
*
|
||||
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
|
||||
* distribute this software and its documentation for any purpose and
|
||||
* without fee is hereby granted, provided that the above copyright
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clean_exit.c,v 1.2 1997/10/09 21:20:19 christos Exp $ */
|
||||
/* $NetBSD: clean_exit.c,v 1.3 1999/07/02 16:15:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* clean_exit() cleans up and terminates the program. It should be called
|
||||
|
@ -6,7 +6,7 @@
|
|||
* cannot be run. Reason: in the case of a datagram-oriented service we must
|
||||
* discard the not-yet received data from the client. Otherwise, inetd will
|
||||
* see the same datagram again and again, and go into a loop.
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
|
||||
#else
|
||||
__RCSID("$NetBSD: clean_exit.c,v 1.2 1997/10/09 21:20:19 christos Exp $");
|
||||
__RCSID("$NetBSD: clean_exit.c,v 1.3 1999/07/02 16:15:33 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/* $NetBSD: diag.c,v 1.3 1997/10/09 21:20:21 christos Exp $ */
|
||||
/* $NetBSD: diag.c,v 1.4 1999/07/02 16:15:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Routines to report various classes of problems. Each report is decorated
|
||||
* with the current context (file name and line number), if available.
|
||||
*
|
||||
*
|
||||
* tcpd_warn() reports a problem and proceeds.
|
||||
*
|
||||
*
|
||||
* tcpd_jump() reports a problem and jumps.
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) diag.c 1.1 94/12/28 17:42:20";
|
||||
#else
|
||||
__RCSID("$NetBSD: diag.c,v 1.3 1997/10/09 21:20:21 christos Exp $");
|
||||
__RCSID("$NetBSD: diag.c,v 1.4 1999/07/02 16:15:33 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
/* $NetBSD: eval.c,v 1.3 1997/10/09 21:20:24 christos Exp $ */
|
||||
/* $NetBSD: eval.c,v 1.4 1999/07/02 16:15:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Routines for controlled evaluation of host names, user names, and so on.
|
||||
* They are, in fact, wrappers around the functions that are specific for
|
||||
* the sockets or TLI programming interfaces. The request_info and host_info
|
||||
* structures are used for result cacheing.
|
||||
*
|
||||
*
|
||||
* These routines allows us to postpone expensive operations until their
|
||||
* results are really needed. Examples are hostname lookups and double
|
||||
* checks, or username lookups. Information that cannot be retrieved is
|
||||
* given the value "unknown" ("paranoid" in case of hostname problems).
|
||||
*
|
||||
*
|
||||
* When ALWAYS_HOSTNAME is off, hostname lookup is done only when required by
|
||||
* tcpd paranoid mode, by access control patterns, or by %letter expansions.
|
||||
*
|
||||
*
|
||||
* When ALWAYS_RFC931 mode is off, user lookup is done only when required by
|
||||
* access control patterns or %letter expansions.
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) eval.c 1.3 95/01/30 19:51:45";
|
||||
#else
|
||||
__RCSID("$NetBSD: eval.c,v 1.3 1997/10/09 21:20:24 christos Exp $");
|
||||
__RCSID("$NetBSD: eval.c,v 1.4 1999/07/02 16:15:33 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: hosts_access.3,v 1.2 1998/01/05 23:54:04 perry Exp $
|
||||
.\" $NetBSD: hosts_access.3,v 1.3 1999/07/02 16:15:33 simonb Exp $
|
||||
.\"
|
||||
.TH HOSTS_ACCESS 3
|
||||
.SH NAME
|
||||
|
@ -90,6 +90,6 @@ with other code that relies on strtok().
|
|||
Wietse Venema (wietse@wzv.win.tue.nl)
|
||||
Department of Mathematics and Computing Science
|
||||
Eindhoven University of Technology
|
||||
Den Dolech 2, P.O. Box 513,
|
||||
Den Dolech 2, P.O. Box 513,
|
||||
5600 MB Eindhoven, The Netherlands
|
||||
\" @(#) hosts_access.3 1.8 96/02/11 17:01:26
|
||||
|
|
|
@ -59,7 +59,7 @@ being optional:
|
|||
daemon_list : client_list : option : option ...
|
||||
.PP
|
||||
\fIdaemon_list\fR is a list of one or more daemon process names
|
||||
(argv[0] values) or wildcards (see below).
|
||||
(argv[0] values) or wildcards (see below).
|
||||
.PP
|
||||
\fIclient_list\fR is a list
|
||||
of one or more host names, host addresses, patterns or wildcards (see
|
||||
|
@ -69,7 +69,7 @@ The more complex forms \fIdaemon@host\fR and \fIuser@host\fR are
|
|||
explained in the sections on server endpoint patterns and on client
|
||||
username lookups, respectively.
|
||||
.PP
|
||||
List elements should be separated by blanks and/or commas.
|
||||
List elements should be separated by blanks and/or commas.
|
||||
.PP
|
||||
With the exception of NIS (YP) netgroup lookups, all access control
|
||||
checks are case insensitive.
|
||||
|
@ -119,7 +119,7 @@ what type of network it is talking to.
|
|||
Matches any host whose name does not match its address.
|
||||
Note that unlike the default mode of \fItcpd\fR, NetBSD \fIinetd\fR
|
||||
does not automatically drop these requests; you must explicitly
|
||||
drop them in your \fI/etc/hosts.allow\fR or \fI/etc/hosts.deny\fR
|
||||
drop them in your \fI/etc/hosts.allow\fR or \fI/etc/hosts.deny\fR
|
||||
file.
|
||||
.IP "{RBL}.\fIdomain\fR"
|
||||
Matches any host whose reversed address appears in the DNS under
|
||||
|
@ -195,7 +195,7 @@ The daemon wrappers can be configured at compile time to perform
|
|||
rule-driven username lookups (default) or to always interrogate the
|
||||
client host. In the case of rule-driven username lookups, the above
|
||||
rule would cause username lookup only when both the \fIdaemon_list\fR
|
||||
and the \fIhost_pattern\fR match.
|
||||
and the \fIhost_pattern\fR match.
|
||||
.PP
|
||||
A user pattern has the same syntax as a daemon process pattern, so the
|
||||
same wildcards apply (netgroup membership is not supported). One
|
||||
|
@ -244,7 +244,7 @@ client connection and the IDENT lookup, although doing so is much
|
|||
harder than spoofing just a client connection. It may also be that
|
||||
the client\'s IDENT server is lying.
|
||||
.PP
|
||||
Note: IDENT lookups don\'t work with UDP services.
|
||||
Note: IDENT lookups don\'t work with UDP services.
|
||||
.SH EXAMPLES
|
||||
The language is flexible enough that different types of access control
|
||||
policy can be expressed with a minimum of fuss. Although the language
|
||||
|
@ -261,13 +261,13 @@ including address and/or network/netmask information, to reduce the
|
|||
impact of temporary name server lookup failures.
|
||||
.SH "MOSTLY CLOSED"
|
||||
In this case, access is denied by default. Only explicitly authorized
|
||||
hosts are permitted access.
|
||||
hosts are permitted access.
|
||||
.PP
|
||||
The default policy (no access) is implemented with a trivial deny
|
||||
file:
|
||||
.PP
|
||||
.ne 2
|
||||
/etc/hosts.deny:
|
||||
/etc/hosts.deny:
|
||||
.in +3
|
||||
ALL: ALL
|
||||
.PP
|
||||
|
@ -278,7 +278,7 @@ The explicitly authorized hosts are listed in the allow file.
|
|||
For example:
|
||||
.PP
|
||||
.ne 2
|
||||
/etc/hosts.allow:
|
||||
/etc/hosts.allow:
|
||||
.in +3
|
||||
ALL: LOCAL @some_netgroup
|
||||
.br
|
||||
|
@ -291,7 +291,7 @@ netgroup. The second rule permits access from all hosts in the
|
|||
\fIterminalserver.foobar.edu\fP.
|
||||
.SH "MOSTLY OPEN"
|
||||
Here, access is granted by default; only explicitly specified hosts are
|
||||
refused service.
|
||||
refused service.
|
||||
.PP
|
||||
The default policy (access granted) makes the allow file redundant so
|
||||
that it can be omitted. The explicitly non-authorized hosts are listed
|
||||
|
@ -374,7 +374,7 @@ including the final newline.
|
|||
Wietse Venema (wietse@wzv.win.tue.nl)
|
||||
Department of Mathematics and Computing Science
|
||||
Eindhoven University of Technology
|
||||
Den Dolech 2, P.O. Box 513,
|
||||
Den Dolech 2, P.O. Box 513,
|
||||
5600 MB Eindhoven, The Netherlands
|
||||
\" @(#) hosts_access.5 1.20 95/01/30 19:51:46
|
||||
\" $NetBSD: hosts_access.5,v 1.6 1999/01/18 19:45:26 christos Exp $
|
||||
\" $NetBSD: hosts_access.5,v 1.7 1999/07/02 16:15:33 simonb Exp $
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hosts_access.c,v 1.6 1999/05/09 16:03:10 christos Exp $ */
|
||||
/* $NetBSD: hosts_access.c,v 1.7 1999/07/02 16:15:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* This module implements a simple access control language that is based on
|
||||
|
@ -6,16 +6,16 @@
|
|||
* network numbers) and daemon process names. When a match is found the
|
||||
* search is terminated, and depending on whether PROCESS_OPTIONS is defined,
|
||||
* a list of options is executed or an optional shell command is executed.
|
||||
*
|
||||
*
|
||||
* Host and user names are looked up on demand, provided that suitable endpoint
|
||||
* information is available as sockaddr_in structures or TLI netbufs. As a
|
||||
* side effect, the pattern matching process may change the contents of
|
||||
* request structure fields.
|
||||
*
|
||||
*
|
||||
* Diagnostics are reported through syslog(3).
|
||||
*
|
||||
*
|
||||
* Compile with -DNETGROUP if your library provides support for netgroups.
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) hosts_access.c 1.20 96/02/11 17:01:27";
|
||||
#else
|
||||
__RCSID("$NetBSD: hosts_access.c,v 1.6 1999/05/09 16:03:10 christos Exp $");
|
||||
__RCSID("$NetBSD: hosts_access.c,v 1.7 1999/07/02 16:15:33 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -114,7 +114,7 @@ struct request_info *request;
|
|||
* client) pair is matched by an entry in the file /etc/hosts.deny,
|
||||
* access is denied. Otherwise, access is granted. A non-existent
|
||||
* access-control file is treated as an empty file.
|
||||
*
|
||||
*
|
||||
* After a rule has been matched, the optional language extensions may
|
||||
* decide to grant or refuse service anyway. Or, while a rule is being
|
||||
* processed, a serious error is found, and it seems better to play safe
|
||||
|
@ -264,7 +264,7 @@ struct host_info *host;
|
|||
/*
|
||||
* This code looks a little hairy because we want to avoid unnecessary
|
||||
* hostname lookups.
|
||||
*
|
||||
*
|
||||
* The KNOWN pattern requires that both address AND name be known; some
|
||||
* patterns are specific to host names or to host addresses; all other
|
||||
* patterns are satisfied when either the address OR the name match.
|
||||
|
@ -306,7 +306,7 @@ char *rbl_hostaddr; /* hostaddr */
|
|||
unsigned long host_address;
|
||||
int ret = NO;
|
||||
size_t len = strlen(rbl_domain) + (4 * 4) + 2;
|
||||
|
||||
|
||||
if (dot_quad_addr(rbl_hostaddr, &host_address) != 0) {
|
||||
tcpd_warn("unable to convert %s to address", rbl_hostaddr);
|
||||
return (NO);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hosts_ctl.c,v 1.2 1997/10/09 21:20:32 christos Exp $ */
|
||||
/* $NetBSD: hosts_ctl.c,v 1.3 1999/07/02 16:15:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* hosts_ctl() combines common applications of the host access control
|
||||
|
@ -6,10 +6,10 @@
|
|||
* access control checker. The host name and user name arguments should be
|
||||
* empty strings, STRING_UNKNOWN or real data. If a match is found, the
|
||||
* optional shell command is executed.
|
||||
*
|
||||
*
|
||||
* Restriction: this interface does not pass enough information to support
|
||||
* selective remote username lookups or selective hostname double checks.
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
|
||||
#else
|
||||
__RCSID("$NetBSD: hosts_ctl.c,v 1.2 1997/10/09 21:20:32 christos Exp $");
|
||||
__RCSID("$NetBSD: hosts_ctl.c,v 1.3 1999/07/02 16:15:33 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: hosts_options.5,v 1.2 1998/01/05 23:54:05 perry Exp $
|
||||
.\" $NetBSD: hosts_options.5,v 1.3 1999/07/02 16:15:33 simonb Exp $
|
||||
.\"
|
||||
.TH HOSTS_OPTIONS 5
|
||||
.SH NAME
|
||||
|
@ -6,7 +6,7 @@ hosts_options \- host access control language extensions
|
|||
.SH DESCRIPTION
|
||||
This document describes optional extensions to the language described
|
||||
in the hosts_access(5) document. The extensions are enabled at program
|
||||
build time. For example, by editing the Makefile and turning on the
|
||||
build time. For example, by editing the Makefile and turning on the
|
||||
PROCESS_OPTIONS compile-time option.
|
||||
.PP
|
||||
The extensible language uses the following format:
|
||||
|
@ -114,7 +114,7 @@ it is still connected to a server. The keepalive option is not useful
|
|||
for datagram (UDP) services.
|
||||
.IP "linger number_of_seconds"
|
||||
Specifies how long the kernel will try to deliver not-yet delivered
|
||||
data after the server process closes a connection.
|
||||
data after the server process closes a connection.
|
||||
.SH USERNAME LOOKUP
|
||||
.IP "rfc931 [ timeout_in_seconds ]"
|
||||
Look up the client user name with the RFC 931 (TAP, IDENT, RFC 1413)
|
||||
|
@ -139,7 +139,7 @@ Warning: banners are supported for connection-oriented (TCP) network
|
|||
services only.
|
||||
.IP "nice [ number ]"
|
||||
Change the nice value of the process (default 10). Specify a positive
|
||||
value to spend more CPU resources on other processes.
|
||||
value to spend more CPU resources on other processes.
|
||||
.IP "setenv name value"
|
||||
Place a (name, value) pair into the process environment. The value is
|
||||
subjected to %<letter> expansions and may contain whitespace (but
|
||||
|
@ -169,6 +169,6 @@ hosts_access(5), the default access control language
|
|||
Wietse Venema (wietse@wzv.win.tue.nl)
|
||||
Department of Mathematics and Computing Science
|
||||
Eindhoven University of Technology
|
||||
Den Dolech 2, P.O. Box 513,
|
||||
Den Dolech 2, P.O. Box 513,
|
||||
5600 MB Eindhoven, The Netherlands
|
||||
\" @(#) hosts_options.5 1.10 94/12/28 17:42:28
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $NetBSD: misc.c,v 1.4 1999/05/09 16:07:56 christos Exp $ */
|
||||
/* $NetBSD: misc.c,v 1.5 1999/07/02 16:15:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Misc routines that are used by tcpd and by tcpdchk.
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
#if 0
|
||||
static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29";
|
||||
#else
|
||||
__RCSID("$NetBSD: misc.c,v 1.4 1999/05/09 16:07:56 christos Exp $");
|
||||
__RCSID("$NetBSD: misc.c,v 1.5 1999/07/02 16:15:33 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
/* $NetBSD: options.c,v 1.4 1998/03/19 17:16:33 tv Exp $ */
|
||||
/* $NetBSD: options.c,v 1.5 1999/07/02 16:15:34 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* General skeleton for adding options to the access control language. The
|
||||
* features offered by this module are documented in the hosts_options(5)
|
||||
* manual page (source file: hosts_options.5, "nroff -man" format).
|
||||
*
|
||||
*
|
||||
* Notes and warnings for those who want to add features:
|
||||
*
|
||||
*
|
||||
* In case of errors, abort options processing and deny access. There are too
|
||||
* many irreversible side effects to make error recovery feasible. For
|
||||
* example, it makes no sense to continue after we have already changed the
|
||||
* userid.
|
||||
*
|
||||
*
|
||||
* In case of errors, do not terminate the process: the routines might be
|
||||
* called from a long-running daemon that should run forever. Instead, call
|
||||
* tcpd_jump() which does a non-local goto back into the hosts_access()
|
||||
* routine.
|
||||
*
|
||||
*
|
||||
* In case of severe errors, use clean_exit() instead of directly calling
|
||||
* exit(), or the inetd may loop on an UDP request.
|
||||
*
|
||||
*
|
||||
* In verification mode (for example, with the "tcpdmatch" command) the
|
||||
* "dry_run" flag is set. In this mode, an option function should just "say"
|
||||
* what it is going to do instead of really doing it.
|
||||
*
|
||||
*
|
||||
* Some option functions do not return (for example, the twist option passes
|
||||
* control to another program). In verification mode (dry_run flag is set)
|
||||
* such options should clear the "dry_run" flag to inform the caller of this
|
||||
|
@ -35,7 +35,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) options.c 1.17 96/02/11 17:01:31";
|
||||
#else
|
||||
__RCSID("$NetBSD: options.c,v 1.4 1998/03/19 17:16:33 tv Exp $");
|
||||
__RCSID("$NetBSD: options.c,v 1.5 1999/07/02 16:15:34 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -80,7 +80,7 @@ static char *get_field /* chew :-delimited field off string */
|
|||
static char *chop_string /* strip leading and trailing blanks */
|
||||
__P((char *));
|
||||
struct syslog_names;
|
||||
static int severity_map
|
||||
static int severity_map
|
||||
__P((struct syslog_names *, char *));
|
||||
|
||||
/* List of functions that implement the options. Add yours here. */
|
||||
|
@ -610,7 +610,7 @@ char *string;
|
|||
* substitution as field terminator. A null argument means resume search
|
||||
* where the previous call terminated. This function destroys its
|
||||
* argument.
|
||||
*
|
||||
*
|
||||
* Work from explicit source or from memory. While processing \: we
|
||||
* overwrite the input. This way we do not have to maintain buffers for
|
||||
* copies of input fields.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: percent_x.c,v 1.2 1997/10/09 21:20:41 christos Exp $ */
|
||||
/* $NetBSD: percent_x.c,v 1.3 1999/07/02 16:15:34 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* percent_x() takes a string and performs %<char> expansions. It aborts the
|
||||
|
@ -6,9 +6,9 @@
|
|||
* of %<char> expansion may be passed on to a shell process. For this
|
||||
* reason, characters with a special meaning to shells are replaced by
|
||||
* underscores.
|
||||
*
|
||||
*
|
||||
* Diagnostics are reported through syslog(3).
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
|
||||
#else
|
||||
__RCSID("$NetBSD: percent_x.c,v 1.2 1997/10/09 21:20:41 christos Exp $");
|
||||
__RCSID("$NetBSD: percent_x.c,v 1.3 1999/07/02 16:15:34 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* $NetBSD: refuse.c,v 1.2 1997/10/09 21:20:44 christos Exp $ */
|
||||
/* $NetBSD: refuse.c,v 1.3 1999/07/02 16:15:34 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* refuse() reports a refused connection, and takes the consequences: in
|
||||
* case of a datagram-oriented service, the unread datagram is taken from
|
||||
* the input queue (or inetd would see the same datagram again and again);
|
||||
* the program is terminated.
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39";
|
||||
#else
|
||||
__RCSID("$NetBSD: refuse.c,v 1.2 1997/10/09 21:20:44 christos Exp $");
|
||||
__RCSID("$NetBSD: refuse.c,v 1.3 1999/07/02 16:15:34 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/* $NetBSD: rfc931.c,v 1.3 1997/10/21 05:39:00 mrg Exp $ */
|
||||
/* $NetBSD: rfc931.c,v 1.4 1999/07/02 16:15:34 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* rfc931() speaks a common subset of the RFC 931, AUTH, TAP, IDENT and RFC
|
||||
* 1413 protocols. It queries an RFC 931 etc. compatible daemon on a remote
|
||||
* host to look up the owner of a connection. The information should not be
|
||||
* used for authentication purposes. This routine intercepts alarm signals.
|
||||
*
|
||||
*
|
||||
* Diagnostics are reported through syslog(3).
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
|
||||
#else
|
||||
__RCSID("$NetBSD: rfc931.c,v 1.3 1997/10/21 05:39:00 mrg Exp $");
|
||||
__RCSID("$NetBSD: rfc931.c,v 1.4 1999/07/02 16:15:34 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/* $NetBSD: shell_cmd.c,v 1.2 1997/10/09 21:20:48 christos Exp $ */
|
||||
/* $NetBSD: shell_cmd.c,v 1.3 1999/07/02 16:15:34 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* shell_cmd() takes a shell command after %<character> substitutions. The
|
||||
* command is executed by a /bin/sh child process, with standard input,
|
||||
* standard output and standard error connected to /dev/null.
|
||||
*
|
||||
*
|
||||
* Diagnostics are reported through syslog(3).
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
|
||||
#else
|
||||
__RCSID("$NetBSD: shell_cmd.c,v 1.2 1997/10/09 21:20:48 christos Exp $");
|
||||
__RCSID("$NetBSD: shell_cmd.c,v 1.3 1999/07/02 16:15:34 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/* $NetBSD: socket.c,v 1.3 1997/10/09 21:20:50 christos Exp $ */
|
||||
/* $NetBSD: socket.c,v 1.4 1999/07/02 16:15:34 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* This module determines the type of socket (datagram, stream), the client
|
||||
* socket address and port, the server socket address and port. In addition,
|
||||
* it provides methods to map a transport address to a printable host name
|
||||
* or address. Socket address information results are in static memory.
|
||||
*
|
||||
*
|
||||
* The result from the hostname lookup method is STRING_PARANOID when a host
|
||||
* pretends to have someone elses name, or when a host name is available but
|
||||
* could not be verified.
|
||||
*
|
||||
*
|
||||
* When lookup or conversion fails the result is set to STRING_UNKNOWN.
|
||||
*
|
||||
*
|
||||
* Diagnostics are reported through syslog(3).
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) socket.c 1.14 95/01/30 19:51:50";
|
||||
#else
|
||||
__RCSID("$NetBSD: socket.c,v 1.3 1997/10/09 21:20:50 christos Exp $");
|
||||
__RCSID("$NetBSD: socket.c,v 1.4 1999/07/02 16:15:34 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -163,10 +163,10 @@ struct host_info *host;
|
|||
/*
|
||||
* Verify that the address is a member of the address list returned
|
||||
* by gethostbyname(hostname).
|
||||
*
|
||||
*
|
||||
* Verify also that gethostbyaddr() and gethostbyname() return the same
|
||||
* hostname, or rshd and rlogind may still end up being spoofed.
|
||||
*
|
||||
*
|
||||
* On some sites, gethostbyname("localhost") returns "localhost.domain".
|
||||
* This is a DNS artefact. We treat it as a special case. When we
|
||||
* can't believe the address list from gethostbyname("localhost")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: tcpd.h,v 1.5 1999/05/09 16:03:11 christos Exp $ */
|
||||
/* $NetBSD: tcpd.h,v 1.6 1999/07/02 16:15:34 simonb Exp $ */
|
||||
/*
|
||||
* @(#) tcpd.h 1.5 96/03/19 16:22:24
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
/* $NetBSD: update.c,v 1.3 1997/10/09 21:20:55 christos Exp $ */
|
||||
/* $NetBSD: update.c,v 1.4 1999/07/02 16:15:34 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Routines for controlled update/initialization of request structures.
|
||||
*
|
||||
*
|
||||
* request_init() initializes its argument. Pointers and string-valued members
|
||||
* are initialized to zero, to indicate that no lookup has been attempted.
|
||||
*
|
||||
*
|
||||
* request_set() adds information to an already initialized request structure.
|
||||
*
|
||||
*
|
||||
* Both functions take a variable-length name-value list.
|
||||
*
|
||||
*
|
||||
* Diagnostics are reported through syslog(3).
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56";
|
||||
#else
|
||||
__RCSID("$NetBSD: update.c,v 1.3 1997/10/09 21:20:55 christos Exp $");
|
||||
__RCSID("$NetBSD: update.c,v 1.4 1999/07/02 16:15:34 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* $NetBSD: workarounds.c,v 1.2 1997/10/09 21:20:58 christos Exp $ */
|
||||
/* $NetBSD: workarounds.c,v 1.3 1999/07/02 16:15:34 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Workarounds for known system software bugs. This module provides wrappers
|
||||
* around library functions and system calls that are known to have problems
|
||||
* on some systems. Most of these workarounds won't do any harm on regular
|
||||
* systems.
|
||||
*
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
|||
#if 0
|
||||
char sccsid[] = "@(#) workarounds.c 1.6 96/03/19 16:22:25";
|
||||
#else
|
||||
__RCSID("$NetBSD: workarounds.c,v 1.2 1997/10/09 21:20:58 christos Exp $");
|
||||
__RCSID("$NetBSD: workarounds.c,v 1.3 1999/07/02 16:15:34 simonb Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -55,7 +55,7 @@ extern int errno;
|
|||
* You have this problem when the compiler complains about illegal lvalues
|
||||
* or something like that. The following code fixes this mutant behaviour.
|
||||
* It should not be enabled on "normal" systems.
|
||||
*
|
||||
*
|
||||
* Bug reported by ben@piglet.cr.usgs.gov (Rev. Ben A. Mesander).
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue