Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ppp Merge local changes, add build glue.



details:   https://anonhg.NetBSD.org/src/rev/bcc3165adba4
branches:  trunk
changeset: 324969:bcc3165adba4
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 28 22:33:42 2013 +0000

description:
Merge local changes, add build glue.

diffstat:

 external/bsd/ppp/Makefile                             |     5 +
 external/bsd/ppp/dist/chat/chat.8                     |   317 +-
 external/bsd/ppp/dist/chat/chat.c                     |   127 +-
 external/bsd/ppp/dist/pppd/auth.c                     |    45 +-
 external/bsd/ppp/dist/pppd/cbcp.c                     |    30 +-
 external/bsd/ppp/dist/pppd/cbcp.h                     |     2 +
 external/bsd/ppp/dist/pppd/ccp.c                      |    10 +-
 external/bsd/ppp/dist/pppd/ccp.h                      |     4 +-
 external/bsd/ppp/dist/pppd/chap-md5.c                 |    30 +-
 external/bsd/ppp/dist/pppd/chap-md5.h                 |     2 +
 external/bsd/ppp/dist/pppd/chap-new.c                 |     8 +
 external/bsd/ppp/dist/pppd/chap-new.h                 |     2 +
 external/bsd/ppp/dist/pppd/chap_ms.c                  |    91 +-
 external/bsd/ppp/dist/pppd/chap_ms.h                  |     2 +
 external/bsd/ppp/dist/pppd/demand.c                   |    25 +-
 external/bsd/ppp/dist/pppd/eap.c                      |    68 +-
 external/bsd/ppp/dist/pppd/eap.h                      |     2 +
 external/bsd/ppp/dist/pppd/ecp.c                      |     8 +-
 external/bsd/ppp/dist/pppd/ecp.h                      |     2 +
 external/bsd/ppp/dist/pppd/eui64.c                    |     9 +-
 external/bsd/ppp/dist/pppd/eui64.h                    |     2 +
 external/bsd/ppp/dist/pppd/fsm.c                      |    14 +-
 external/bsd/ppp/dist/pppd/fsm.h                      |     2 +
 external/bsd/ppp/dist/pppd/ipcp.c                     |     9 +-
 external/bsd/ppp/dist/pppd/ipcp.h                     |     2 +
 external/bsd/ppp/dist/pppd/ipv6cp.c                   |    19 +-
 external/bsd/ppp/dist/pppd/ipv6cp.h                   |     2 +
 external/bsd/ppp/dist/pppd/ipxcp.c                    |    11 +-
 external/bsd/ppp/dist/pppd/ipxcp.h                    |     2 +
 external/bsd/ppp/dist/pppd/lcp.c                      |     9 +-
 external/bsd/ppp/dist/pppd/lcp.h                      |     2 +
 external/bsd/ppp/dist/pppd/magic.c                    |     9 +-
 external/bsd/ppp/dist/pppd/magic.h                    |     2 +
 external/bsd/ppp/dist/pppd/main.c                     |    20 +-
 external/bsd/ppp/dist/pppd/mppe.h                     |     2 +
 external/bsd/ppp/dist/pppd/multilink.c                |     8 +-
 external/bsd/ppp/dist/pppd/options.c                  |   122 +-
 external/bsd/ppp/dist/pppd/patchlevel.h               |     2 +
 external/bsd/ppp/dist/pppd/pathnames.h                |    15 +-
 external/bsd/ppp/dist/pppd/pppcrypt.c                 |    26 +-
 external/bsd/ppp/dist/pppd/pppcrypt.h                 |     2 +
 external/bsd/ppp/dist/pppd/pppd.8                     |     1 +
 external/bsd/ppp/dist/pppd/pppd.h                     |    17 +-
 external/bsd/ppp/dist/pppd/session.c                  |    26 +-
 external/bsd/ppp/dist/pppd/session.h                  |     2 +
 external/bsd/ppp/dist/pppd/tty.c                      |     8 +
 external/bsd/ppp/dist/pppd/upap.c                     |     9 +-
 external/bsd/ppp/dist/pppd/upap.h                     |     2 +
 external/bsd/ppp/dist/pppd/utils.c                    |    56 +-
 external/bsd/ppp/dist/pppdump/.gitignore              |     1 -
 external/bsd/ppp/dist/pppdump/bsd-comp.c              |    50 +-
 external/bsd/ppp/dist/pppdump/deflate.c               |    47 +-
 external/bsd/ppp/dist/pppdump/pppdump.c               |    50 +-
 external/bsd/ppp/dist/pppstats/.gitignore             |     1 -
 external/bsd/ppp/dist/pppstats/pppstats.c             |    22 +-
 external/bsd/ppp/ppp2netbsd                           |    70 +
 external/bsd/ppp/usr.sbin/Makefile                    |     5 +
 external/bsd/ppp/usr.sbin/Makefile.inc                |    13 +
 external/bsd/ppp/usr.sbin/chat/Makefile               |    10 +
 external/bsd/ppp/usr.sbin/plugins/minconn/Makefile    |    16 +
 external/bsd/ppp/usr.sbin/plugins/passwordfd/Makefile |    16 +
 external/bsd/ppp/usr.sbin/plugins/status/Makefile     |    14 +
 external/bsd/ppp/usr.sbin/plugins/status/status.c     |   146 +
 external/bsd/ppp/usr.sbin/pppd/Makefile               |    42 +
 external/bsd/ppp/usr.sbin/pppd/sys-bsd.c              |  2071 +++++++++++++++++
 external/bsd/ppp/usr.sbin/pppd/tdb.c                  |  1293 ++++++++++
 external/bsd/ppp/usr.sbin/pppd/tdb.h                  |    79 +
 external/bsd/ppp/usr.sbin/pppdump/Makefile            |    14 +
 external/bsd/ppp/usr.sbin/pppdump/pppdump.h           |    37 +
 external/bsd/ppp/usr.sbin/pppstats/Makefile           |    12 +
 70 files changed, 4714 insertions(+), 487 deletions(-)

diffs (truncated from 7291 to 300 lines):

diff -r c80faa3fd204 -r bcc3165adba4 external/bsd/ppp/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/ppp/Makefile Thu Nov 28 22:33:42 2013 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: Makefile,v 1.1 2013/11/28 22:33:42 christos Exp $
+
+SUBDIR=        usr.sbin
+
+.include <bsd.subdir.mk>
diff -r c80faa3fd204 -r bcc3165adba4 external/bsd/ppp/dist/chat/chat.8
--- a/external/bsd/ppp/dist/chat/chat.8 Thu Nov 28 22:28:30 2013 +0000
+++ b/external/bsd/ppp/dist/chat/chat.8 Thu Nov 28 22:33:42 2013 +0000
@@ -1,4 +1,4 @@
-.\" -*- nroff -*-
+.\"    $NetBSD: chat.8,v 1.2 2013/11/28 22:33:42 christos Exp $
 .\" manual page [] for chat 1.8
 .\" Id: chat.8,v 1.11 2004/11/13 12:22:49 paulus Exp 
 .\" SH section heading
@@ -18,35 +18,47 @@
 .SH DESCRIPTION
 .LP
 The \fIchat\fR program defines a conversational exchange between the
-computer and the modem. Its primary purpose is to establish the
+computer and the modem.
+Its primary purpose is to establish the
 connection between the Point-to-Point Protocol Daemon (\fIpppd\fR) and
 the remote's \fIpppd\fR process.
 .SH OPTIONS
 .TP
-.B \-f \fI<chat file>
-Read the chat script from the chat \fIfile\fR. The use of this option
-is mutually exclusive with the chat script parameters. The user must
-have read access to the file. Multiple lines are permitted in the
-file. Space or horizontal tab characters should be used to separate
+.B \-f \fI\*[Lt]chat file\*[Gt]
+Read the chat script from the chat \fIfile\fR.
+The use of this option
+is mutually exclusive with the chat script parameters.
+The user must
+have read access to the file.
+Multiple lines are permitted in the
+file.
+Space or horizontal tab characters should be used to separate
 the strings.
 .TP
-.B \-t \fI<timeout>
-Set the timeout for the expected string to be received. If the string
+.B \-t \fI\*[Lt]timeout\*[Gt]
+Set the timeout for the expected string to be received.
+If the string
 is not received within the time limit then the reply string is not
-sent. An alternate reply may be sent or the script will fail if there
-is no alternate reply string. A failed script will cause the
+sent.
+An alternate reply may be sent or the script will fail if there
+is no alternate reply string.
+A failed script will cause the
 \fIchat\fR program to terminate with a non-zero error code.
 .TP
-.B \-r \fI<report file>
-Set the file for output of the report strings. If you use the keyword
-\fIREPORT\fR, the resulting strings are written to this file. If this
+.B \-r \fI\*[Lt]report file\*[Gt]
+Set the file for output of the report strings.
+If you use the keyword
+\fIREPORT\fR, the resulting strings are written to this file.
+If this
 option is not used and you still use \fIREPORT\fR keywords, the
 \fIstderr\fR file is used for the report strings.
 .TP
 .B \-e
-Start with the echo option turned on. Echoing may also be turned on
+Start with the echo option turned on.
+Echoing may also be turned on
 or off at specific points in the chat script by using the \fIECHO\fR
-keyword. When echoing is enabled, all output from the modem is echoed
+keyword.
+When echoing is enabled, all output from the modem is echoed
 to \fIstderr\fR.
 .TP
 .B \-E
@@ -54,33 +66,40 @@
 standard \fI$xxx\fR syntax.
 .TP
 .B \-v
-Request that the \fIchat\fR script be executed in a verbose mode. The
+Request that the \fIchat\fR script be executed in a verbose mode.
+The
 \fIchat\fR program will then log the execution state of the chat
 script as well as all text received from the modem and the output
-strings sent to the modem.  The default is to log through the SYSLOG;
+strings sent to the modem.
+ The default is to log through the SYSLOG;
 the logging method may be altered with the \-S and \-s flags.
 .TP
 .B \-V
 Request that the \fIchat\fR script be executed in a stderr verbose
-mode. The \fIchat\fR program will then log all text received from the
-modem and the output strings sent to the modem to the stderr device. This
+mode.
+The \fIchat\fR program will then log all text received from the
+modem and the output strings sent to the modem to the stderr device.
+This
 device is usually the local console at the station running the chat or
 pppd program.
 .TP
 .B \-s
-Use stderr.  All log messages from '\-v' and all error messages will be
+Use stderr.
+ All log messages from '\-v' and all error messages will be
 sent to stderr.
 .TP
 .B \-S
-Do not use the SYSLOG.  By default, error messages are sent to the
-SYSLOG.  The use of \-S will prevent both log messages from '\-v' and
+Do not use the SYSLOG.
+ By default, error messages are sent to the
+SYSLOG.
+ The use of \-S will prevent both log messages from '\-v' and
 error messages from being sent to the SYSLOG.
 .TP
-.B \-T \fI<phone number>
+.B \-T \fI\*[Lt]phone number\*[Gt]
 Pass in an arbitrary string, usually a phone number, that will be
 substituted for the \eT substitution metacharacter in a send string.
 .TP
-.B \-U \fI<phone number 2>
+.B \-U \fI\*[Lt]phone number 2\*[Gt]
 Pass in a second string, usually a phone number, that will be
 substituted for the \eU substitution metacharacter in a send string.
 This is useful when dialing an ISDN terminal adapter that requires two 
@@ -100,29 +119,37 @@
 ogin:\-BREAK\-ogin: ppp ssword: hello2u2
 .LP
 This line indicates that the \fIchat\fR program should expect the string
-"ogin:". If it fails to receive a login prompt within the time interval
+"ogin:".
+If it fails to receive a login prompt within the time interval
 allotted, it is to send a break sequence to the remote and then expect the
-string "ogin:". If the first "ogin:" is received then the break sequence is
+string "ogin:".
+If the first "ogin:" is received then the break sequence is
 not generated.
 .LP
 Once it received the login prompt the \fIchat\fR program will send the
-string ppp and then expect the prompt "ssword:". When it receives the
+string ppp and then expect the prompt "ssword:".
+When it receives the
 prompt for the password, it will send the password hello2u2.
 .LP
-A carriage return is normally sent following the reply string. It is not
+A carriage return is normally sent following the reply string.
+It is not
 expected in the "expect" string unless it is specifically requested by using
 the \er character sequence.
 .LP
 The expect sequence should contain only what is needed to identify the
-string. Since it is normally stored on a disk file, it should not contain
-variable information. It is generally not acceptable to look for time
+string.
+Since it is normally stored on a disk file, it should not contain
+variable information.
+It is generally not acceptable to look for time
 strings, network identification strings, or other variable pieces of data as
 an expect string.
 .LP
 To help correct for characters which may be corrupted during the initial
-sequence, look for the string "ogin:" rather than "login:". It is possible
+sequence, look for the string "ogin:" rather than "login:".
+It is possible
 that the leading "l" character may be received in error and you may never
-find the string even though it was sent by the system. For this reason,
+find the string even though it was sent by the system.
+For this reason,
 scripts look for "ogin:" rather than "login:" and "ssword:" rather than
 "password:".
 .LP
@@ -132,21 +159,27 @@
 .LP
 In other words, expect ....ogin:, send ppp, expect ...ssword:, send hello2u2.
 .LP
-In actual practice, simple scripts are rare. At the vary least, you
+In actual practice, simple scripts are rare.
+At the vary least, you
 should include sub-expect sequences should the original string not be
-received. For example, consider the following script:
+received.
+For example, consider the following script:
 .IP
 ogin:\-\-ogin: ppp ssword: hello2u2
 .LP
-This would be a better script than the simple one used earlier. This would look
+This would be a better script than the simple one used earlier.
+This would look
 for the same login: prompt, however, if one was not received, a single
-return sequence is sent and then it will look for login: again. Should line
+return sequence is sent and then it will look for login: again.
+Should line
 noise obscure the first login prompt then sending the empty line will
 usually generate a login prompt again.
 .SH COMMENTS
-Comments can be embedded in the chat script. A comment is a line which
-starts with the \fB#\fR (hash) character in column 1. Such comment
-lines are just ignored by the chat program. If a '#' character is to
+Comments can be embedded in the chat script.
+A comment is a line which
+starts with the \fB#\fR (hash) character in column 1.
+Such comment lines are just ignored by the chat program.
+If a '#' character is to
 be expected as the first character of the expect sequence, you should
 quote the expect string.
 If you want to wait for a prompt that starts with a # (hash)
@@ -160,36 +193,47 @@
 .SH SENDING DATA FROM A FILE
 If the string to send starts with an at sign (@), the rest of the
 string is taken to be the name of a file to read to get the string to
-send.  If the last character of the data read is a newline, it is
-removed.  The file can be a named pipe (or fifo) instead of a regular
-file.  This provides a way for \fBchat\fR to communicate with another
+send.
+If the last character of the data read is a newline, it is removed.
+The file can be a named pipe (or fifo) instead of a regular file.
+This provides a way for \fBchat\fR to communicate with another
 program, for example, a program to prompt the user and receive a
 password typed in.
 .LP
 
 .SH ABORT STRINGS
-Many modems will report the status of the call as a string. These
-strings may be \fBCONNECTED\fR or \fBNO CARRIER\fR or \fBBUSY\fR. It
-is often desirable to terminate the script should the modem fail to
-connect to the remote. The difficulty is that a script would not know
-exactly which modem string it may receive. On one attempt, it may
+Many modems will report the status of the call as a string.
+These
+strings may be \fBCONNECTED\fR or \fBNO CARRIER\fR or \fBBUSY\fR.
+It is often desirable to terminate the script should the modem fail to
+connect to the remote.
+The difficulty is that a script would not know
+exactly which modem string it may receive.
+On one attempt, it may
 receive \fBBUSY\fR while the next time it may receive \fBNO CARRIER\fR.
 .LP
 These "abort" strings may be specified in the script using the \fIABORT\fR
-sequence. It is written in the script as in the following example:
+sequence.
+It is written in the script as in the following example:
 .IP
 ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK ATDT5551212 CONNECT
 .LP
-This sequence will expect nothing; and then send the string ATZ. The
-expected response to this is the string \fIOK\fR. When it receives \fIOK\fR,
-the string ATDT5551212 to dial the telephone. The expected string is
-\fICONNECT\fR. If the string \fICONNECT\fR is received the remainder of the
-script is executed. However, should the modem find a busy telephone, it will
-send the string \fIBUSY\fR. This will cause the string to match the abort
-character sequence. The script will then fail because it found a match to
-the abort string. If it received the string \fINO CARRIER\fR, it will abort
-for the same reason. Either string may be received. Either string will
-terminate the \fIchat\fR script.
+This sequence will expect nothing; and then send the string ATZ.
+The expected response to this is the string \fIOK\fR.
+When it receives \fIOK\fR,
+the string ATDT5551212 to dial the telephone.
+The expected string is
+\fICONNECT\fR.
+If the string \fICONNECT\fR is received the remainder of the
+script is executed.
+However, should the modem find a busy telephone, it will
+send the string \fIBUSY\fR.
+This will cause the string to match the abort character sequence.
+The script will then fail because it found a match to the abort string.
+If it received the string \fINO CARRIER\fR, it will abort
+for the same reason.
+Either string may be received.
+Either string will terminate the \fIchat\fR script.
 .SH CLR_ABORT STRINGS
 This sequence allows for clearing previously set \fBABORT\fR strings.
 \fBABORT\fR strings are kept in an array of a pre-determined size (at
@@ -197,18 +241,21 @@
 entries so that new strings can use that space.
 .SH SAY STRINGS
 The \fBSAY\fR directive allows the script to send strings to the user
-at the terminal via standard error.  If \fBchat\fR is being run by
+at the terminal via standard error.
+ If \fBchat\fR is being run by
 pppd, and pppd is running as a daemon (detached from its controlling
 terminal), standard error will normally be redirected to the file
 /etc/ppp/connect\-errors.
 .LP
-\fBSAY\fR strings must be enclosed in single or double quotes. If
+\fBSAY\fR strings must be enclosed in single or double quotes.
+If
 carriage return and line feed are needed in the string to be output,
 you must explicitly add them to your string.
 .LP
 The SAY strings could be used to give progress messages in sections of
 the script where you want to have 'ECHO OFF' but still let the user
-know what is happening.  An example is:
+know what is happening.



Home | Main Index | Thread Index | Old Index