diff options
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r-- | usr.sbin/pppd/Makefile | 20 | ||||
-rw-r--r-- | usr.sbin/pppd/RELNOTES | 295 | ||||
-rw-r--r-- | usr.sbin/pppd/args.h | 12 | ||||
-rw-r--r-- | usr.sbin/pppd/callout.h | 18 | ||||
-rw-r--r-- | usr.sbin/pppd/md5.c | 304 | ||||
-rw-r--r-- | usr.sbin/pppd/md5.h | 58 | ||||
-rw-r--r-- | usr.sbin/pppd/ppp.h | 41 |
7 files changed, 0 insertions, 748 deletions
diff --git a/usr.sbin/pppd/Makefile b/usr.sbin/pppd/Makefile deleted file mode 100644 index a1f6b849d0d69..0000000000000 --- a/usr.sbin/pppd/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# $Id: Makefile.bsd,v 1.13 1996/10/08 04:33:33 paulus Exp $ - -BINDIR?= /usr/sbin -# -D_BITYPES is for FreeBSD, which doesn't define anything to -# tell us that u_int32_t gets defined if <sys/types.h> is included. -# Remove for older *BSD systems for which this isn't true. -CFLAGS+= -g -I.. -DHAVE_PATHS_H -D_BITYPES - -PROG= pppd -SRCS= main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \ - demand.c auth.c options.c sys-bsd.c -MAN= pppd.cat8 -MAN8= pppd.8 -BINMODE=4555 -BINOWN= root - -LDADD= -lcrypt -lutil -DPADD= ${LIBCRYPT} ${LIBUTIL} - -.include <bsd.prog.mk> diff --git a/usr.sbin/pppd/RELNOTES b/usr.sbin/pppd/RELNOTES deleted file mode 100644 index b993de2b4689a..0000000000000 --- a/usr.sbin/pppd/RELNOTES +++ /dev/null @@ -1,295 +0,0 @@ - pppd-2.1.1 release notes - Paul Mackerras 27 May 1994 - -This file details the new and changed features in pppd since version 1.3. -Briefly: - - the protocol code has been updated to conform with - RFCs 1548, 1549, 1332 and 1334 - - security has been improved - - functionality has been improved in various ways. - - -NEW FEATURES - -* The option negotiation automaton has been updated to RFC1548. LCP -now rejects the Quality Protocol option, since LQR is not implemented -yet. IPCP now uses the IP-Address option, and falls back to the old -IP-Addresses option if the IP-Address option is rejected. IPCP also -uses the new form of the VJ-Compression option. - -RFC1548 defines the "passive" option to mean that the automaton -outputs configure-request packets initially, but does not close down -if no answer is received. A valid configure-request received will -restart the negotiation. The "silent" option has been added with the -old meaning of "passive", i.e. the automaton will not output -configure-requests until it receives a valid one from the peer. - -* More systems are supported: in addition to SunOS 4.x and BSD/Net-2 -derived systems, Ultrix and Linux are supported, thanks to Robert -Olsson, Per Sundstrom, Michael Callahan and Al Longyear. - -* Options can be taken from files as well as the command line. pppd -reads options from the files /etc/ppp/options and ~/.ppprc before -looking at the command line, and /etc/ppp/options.<ttyname> after -interpreting the options on the command line. An options file is -parsed into a series of words, delimited by whitespace. Whitespace -can be included in a word by enclosing the word in quotes ("). -Backslash (\) quotes the following character. A hash (#) starts a -comment, which continues until the end of the line. In addition, the -`file' option causes pppd to read options from a file. pppd will -report and error and exit if ~/.ppprc or the file given as the -argument to the `file' option cannot be read by the user who invoked -pppd. - -* On those systems, such as NetBSD, where the serial line speed is -stored in the termios structure in bits per second (i.e. B9600 == -9600), it is possible to set any speed. - -* If desired, pppd will output LCP echo-request frames periodically -while the link is up, and take the link down if no replies are -received to a user-configurable number of echo-requests. This can be -used to detect that the serial connection has been broken on those -systems which don't have hardware modem control lines. - -AUTHENTICATION - -Previous versions of pppd have provided no control over which IP -addresses the peer can use. Thus it is possible for the peer to -impersonate another host on the local network, leading to various -security holes. In addition, the authentication mechanisms were quite -weak: if the peer refused to agree to authenticate, pppd would print a -warning message but still allow the link to come up. The CHAP -implementation also appeared to be quite broken (has anybody actually -used it?). - -This new version of pppd addresses these problems. My aim has been to -provide system administrators with sufficient access control that PPP -access to a server machine can be provided to legitimate users without -fear of compromising the security of the server or the network it's -on. In part this is provided by the /etc/ppp/options file, where the -administrator can place options to require authentication which cannot -be disabled by users. Thus the new pppd can made setuid-root and run -by users. - -The behaviour where pppd refuses to run unless the /etc/ppp/options -file is present and readable by pppd is now the default behaviour. If -you really want pppd to run without the presence of the -/etc/ppp/options file, you will have to include -DREQ_SYSOPTIONS=0 on -the compilation command line. - -The options related to authentication are: - - auth Require authentication from the peer. If neither - +chap or +pap is also given, either CHAP or PAP - authentication will be accepted. - +chap Require CHAP authentication from the peer. - +pap Require PAP authentication from the peer. - -chap Don't agree to authenticate ourselves with the peer - using CHAP. - -pap Don't agree to authenticate ourselves using PAP. - +ua <f> Get username and password for authenticating ourselves - with the peer using PAP from file <f>. - name <n> Use <n> as the local name for authentication. - usehostname Use this machine's hostname as the local name for - authentication. - remotename <n> Use <n> as the name of the peer for authentication. - login If the peer authenticates using PAP, check the - supplied username and password against the system - password database, and make a wtmp entry. - user <n> Use <n> as the username for authenticating ourselves - using PAP. - -The defaults are to agree to authenticate if requested, and to not -require authentication from the peer. However, pppd will not agree to -authenticate itself with a particular protocol if it has no secrets -which could be used to do so. - -Authentication is based on secrets, which are selected from secrets -files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP). -Both secrets files have the same format, and both can store secrets -for several combinations of server (authenticating peer) and client -(peer being authenticated). Note that each end can be both a server -and client, and that different protocols can be used in the two -directions if desired. - -A secrets file is parsed into words as for a options file. A secret -is specified by a line containing at least 3 words, in the order -client, server, secret. Any following words on the same line are -taken to be a list of acceptable IP addresses for that client. If -there are only 3 words on the line, it is assumed that any IP address -is OK; to disallow all IP addresses, use "-". If the secret starts -with an `@', what follows is assumed to be the name of a file from -which to read the secret. A "*" as the client or server name matches -any name. When selecting a secret, pppd takes the best match, i.e. -the match with the fewest wildcards. - -Thus a secrets file contains both secrets for use in authenticating -other hosts, plus secrets which we use for authenticating ourselves to -others. Which secret to use is chosen based on the names of the host -(the `local name') and its peer (the `remote name'). The local name -is set as follows: - - if the `usehostname' option is given, - then the local name is the hostname of this machine - (with the domain appended, if given) - - else if the `name' option is given, - then use the argument of the first `name' option seen - - else if the local IP address is specified with a - host name (e.g. `sirius:') - then use that host name - - else use the hostname of this machine - (with the domain appended, if given) - -When authenticating ourselves using PAP, there is also a `username' -which is the local name by default, but can be set with the `user' -option or the `+ua' option. - -The remote name is set as follows: - - if the `remotename' option is given, - then use the argument of the last `remotename' option seen - - else if the remote IP address is specified with a - host name (e.g. `avago:') - then use that host name - - else the remote name is the null string "". - -Secrets are selected from the PAP secrets file as follows: - -- For authenticating the peer, look for a secret with client == -username specified in the PAP authenticate-request, and server == -local name. - -- For authenticating ourselves to the peer, look for a secret with -client == our username, server == remote name. - -When authenticating the peer with PAP, a secret of "" matches any -password supplied by the peer. If the password doesn't match the -secret, the password is encrypted using crypt() and checked against -the secret again; thus secrets for authenticating the peer can be -stored in encrypted form. If the `login' option was specified, the -username and password are also checked against the system password -database. Thus, the system administrator can set up the pap-secrets -file to allow PPP access only to certain users, and to restrict the -set of IP addresses that each user can use. - -Secrets are selected from the CHAP secrets file as follows: - -- For authenticating the peer, look for a secret with client == name -specified in the CHAP-Response message, and server == local name. - -- For authenticating ourselves to the peer, look for a secret with -client == local name, and server == name specified in the -CHAP-Challenge message. - -Authentication must be satisfactorily completed before IPCP (or any -other Network Control Protocol) can be started. If authentication -fails, pppd will terminated the link (by closing LCP). If IPCP -negotiates an unacceptable IP address for the remote host, IPCP will -be closed. IP packets cannot be sent or received until IPCP is -successfully opened. - -(some examples needed here perhaps) - - -ROUTING - -Setting the addresses on a ppp interface is sufficient to create a -host route to the remote end of the link. Sometimes it is desirable -to add a default route through the remote host, as in the case of a -machine whose only connection to the Internet is through the ppp -interface. The `defaultroute' option causes pppd to create such a -default route when IPCP comes up, and delete it when the link is -terminated. - -In some cases it is desirable to use proxy ARP, for example on a -server machine connected to a LAN, in order to allow other hosts to -communicate with the remote host. The `proxyarp' option causes pppd -to look for a network interface (an interface supporting broadcast and -ARP, which is up and not a point-to-point or loopback interface) on -the same subnet as the remote host. If found, pppd creates a -permanent, published ARP entry with the IP address of the remote host -and the hardware address of the network interface found. - - -OTHER NEW AND CHANGED OPTIONS - - modem Use modem control lines (not fully implemented - yet) - local Don't use modem control lines - persist Keep reopening connection (not fully - implemented yet) - - lcp-restart <n> Set timeout for LCP retransmissions to <n> - seconds (default 3 seconds) - lcp-max-terminate <n> Set maximum number of LCP terminate-request - transmissions (default 2) - lcp-max-configure <n> Set maximum number of LCP configure-request - transmissions (default 10) - lcp-max-failure <n> Set maximum number of LCP configure-Naks sent - before converting to configure-rejects - (default 10) - - ipcp-restart <n> Set timeout for IPCP retransmissions to <n> - seconds (default 3 seconds) - ipcp-max-terminate <n> Set maximum number of IPCP - terminate-request transmissions (default 2) - ipcp-max-configure <n> Set maximum number of IPCP - configure-request transmissions (default 10) - ipcp-max-failure <n> Set maximum number of IPCP configure-Naks - sent before converting to configure-rejects - (default 10) - - upap-restart <n> Set timeout for PAP retransmissions to - <n> seconds (default 3 seconds) - upap-max-authreq <n> Set maximum number of Authenticate-request - retransmissions (default 10) - - chap-restart <n> Set timeout for CHAP retransmissions to - <n> seconds (default 3 seconds) - chap-max-challenge <n> Set maximum number of CHAP Challenge - retransmissions (default 10) - chap-interval <n> Set the interval between CHAP rechallenges - (default 0, meaning infinity) - -The -ua option no longer exists. - - -SOFTWARE RESTRUCTURING - -Many of the source files for pppd have changed significantly from -ppp-1.3, upon which it is based. In particular: - -- the macros for system-dependent operations in pppd.h have mostly -been removed. Instead these operations are performed by procedures in -sys-bsd.c (for BSD-4.4ish systems like NetBSD, 386BSD, etc.) or -sys-str.c (for SunOS-based systems using STREAMS). (I got sick of -having to recompile everything every time I wanted to change one of -those horrible macros.) - -- most of the system-dependent code in main.c has also been removed to -sys-bsd.c and sys-str.c. - -- the option processing code in main.c has been removed to options.c. - -- the authentication code in main.c has been removed to auth.c, which -also contains substantial amounts of new code. - -- fsm.c has changed significantly, and lcp.c, ipcp.c, and upap.c have -changed somewhat. chap.c has also changed significantly. - - -STILL TO DO - -* sort out appropriate modem control and implement the persist option -properly; add an `answer' option for auto-answering a modem. - -* add an inactivity timeout and demand dialing. - -* implement link quality monitoring. - -* implement other network control protocols. diff --git a/usr.sbin/pppd/args.h b/usr.sbin/pppd/args.h deleted file mode 100644 index e8798382786b5..0000000000000 --- a/usr.sbin/pppd/args.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * neat macro from ka9q to "do the right thing" with ansi prototypes - * $Id: args.h,v 1.1 1993/11/11 03:54:25 paulus Exp $ - */ - -#ifndef __ARGS -#ifdef __STDC__ -#define __ARGS(x) x -#else -#define __ARGS(x) () -#endif -#endif diff --git a/usr.sbin/pppd/callout.h b/usr.sbin/pppd/callout.h deleted file mode 100644 index 115d01c66653a..0000000000000 --- a/usr.sbin/pppd/callout.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Note: This is a copy of /usr/include/sys/callout.h with the c_func */ -/* member of struct callout changed from a pointer to a function of type int*/ -/* to a pointer to a function of type void (generic pointer) as per */ -/* ANSI C */ - -/* $Id: callout.h,v 1.1 1993/11/11 03:54:25 paulus Exp $ */ - -#ifndef _ppp_callout_h -#define _ppp_callout_h - -struct callout { - int c_time; /* incremental time */ - caddr_t c_arg; /* argument to routine */ - void (*c_func)(); /* routine (changed to void (*)() */ - struct callout *c_next; -}; - -#endif /*!_ppp_callout_h*/ diff --git a/usr.sbin/pppd/md5.c b/usr.sbin/pppd/md5.c deleted file mode 100644 index 480c860c0aa9b..0000000000000 --- a/usr.sbin/pppd/md5.c +++ /dev/null @@ -1,304 +0,0 @@ - - -/* - *********************************************************************** - ** md5.c -- the source code for MD5 routines ** - ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** - ** Created: 2/17/90 RLR ** - ** Revised: 1/91 SRD,AJ,BSK,JT Reference C ver., 7/10 constant corr. ** - *********************************************************************** - */ - -/* - *********************************************************************** - ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** - ** ** - ** License to copy and use this software is granted provided that ** - ** it is identified as the "RSA Data Security, Inc. MD5 Message- ** - ** Digest Algorithm" in all material mentioning or referencing this ** - ** software or this function. ** - ** ** - ** License is also granted to make and use derivative works ** - ** provided that such works are identified as "derived from the RSA ** - ** Data Security, Inc. MD5 Message-Digest Algorithm" in all ** - ** material mentioning or referencing the derived work. ** - ** ** - ** RSA Data Security, Inc. makes no representations concerning ** - ** either the merchantability of this software or the suitability ** - ** of this software for any particular purpose. It is provided "as ** - ** is" without express or implied warranty of any kind. ** - ** ** - ** These notices must be retained in any copies of any part of this ** - ** documentation and/or software. ** - *********************************************************************** - */ - -#include "md5.h" - -/* - *********************************************************************** - ** Message-digest routines: ** - ** To form the message digest for a message M ** - ** (1) Initialize a context buffer mdContext using MD5Init ** - ** (2) Call MD5Update on mdContext and M ** - ** (3) Call MD5Final on mdContext ** - ** The message digest is now in mdContext->digest[0...15] ** - *********************************************************************** - */ - -/* forward declaration */ -static void Transform (); - -static unsigned char PADDING[64] = { - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -/* F, G, H and I are basic MD5 functions */ -#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) -#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) -#define H(x, y, z) ((x) ^ (y) ^ (z)) -#define I(x, y, z) ((y) ^ ((x) | (~z))) - -/* ROTATE_LEFT rotates x left n bits */ -#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) - -/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */ -/* Rotation is separate from addition to prevent recomputation */ -#define FF(a, b, c, d, x, s, ac) \ - {(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define GG(a, b, c, d, x, s, ac) \ - {(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define HH(a, b, c, d, x, s, ac) \ - {(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define II(a, b, c, d, x, s, ac) \ - {(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } - -#ifdef __STDC__ -#define UL(x) x##U -#else -#define UL(x) x -#endif - -/* The routine MD5Init initializes the message-digest context - mdContext. All fields are set to zero. - */ -void MD5Init (mdContext) -MD5_CTX *mdContext; -{ - mdContext->i[0] = mdContext->i[1] = (UINT4)0; - - /* Load magic initialization constants. - */ - mdContext->buf[0] = (UINT4)0x67452301; - mdContext->buf[1] = (UINT4)0xefcdab89; - mdContext->buf[2] = (UINT4)0x98badcfe; - mdContext->buf[3] = (UINT4)0x10325476; -} - -/* The routine MD5Update updates the message-digest context to - account for the presence of each of the characters inBuf[0..inLen-1] - in the message whose digest is being computed. - */ -void MD5Update (mdContext, inBuf, inLen) -MD5_CTX *mdContext; -unsigned char *inBuf; -unsigned int inLen; -{ - UINT4 in[16]; - int mdi; - unsigned int i, ii; - - /* compute number of bytes mod 64 */ - mdi = (int)((mdContext->i[0] >> 3) & 0x3F); - - /* update number of bits */ - if ((mdContext->i[0] + ((UINT4)inLen << 3)) < mdContext->i[0]) - mdContext->i[1]++; - mdContext->i[0] += ((UINT4)inLen << 3); - mdContext->i[1] += ((UINT4)inLen >> 29); - - while (inLen--) { - /* add new character to buffer, increment mdi */ - mdContext->in[mdi++] = *inBuf++; - - /* transform if necessary */ - if (mdi == 0x40) { - for (i = 0, ii = 0; i < 16; i++, ii += 4) - in[i] = (((UINT4)mdContext->in[ii+3]) << 24) | - (((UINT4)mdContext->in[ii+2]) << 16) | - (((UINT4)mdContext->in[ii+1]) << 8) | - ((UINT4)mdContext->in[ii]); - Transform (mdContext->buf, in); - mdi = 0; - } - } -} - -/* The routine MD5Final terminates the message-digest computation and - ends with the desired message digest in mdContext->digest[0...15]. - */ -void MD5Final (mdContext) -MD5_CTX *mdContext; -{ - UINT4 in[16]; - int mdi; - unsigned int i, ii; - unsigned int padLen; - - /* save number of bits */ - in[14] = mdContext->i[0]; - in[15] = mdContext->i[1]; - - /* compute number of bytes mod 64 */ - mdi = (int)((mdContext->i[0] >> 3) & 0x3F); - - /* pad out to 56 mod 64 */ - padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi); - MD5Update (mdContext, PADDING, padLen); - - /* append length in bits and transform */ - for (i = 0, ii = 0; i < 14; i++, ii += 4) - in[i] = (((UINT4)mdContext->in[ii+3]) << 24) | - (((UINT4)mdContext->in[ii+2]) << 16) | - (((UINT4)mdContext->in[ii+1]) << 8) | - ((UINT4)mdContext->in[ii]); - Transform (mdContext->buf, in); - - /* store buffer in digest */ - for (i = 0, ii = 0; i < 4; i++, ii += 4) { - mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF); - mdContext->digest[ii+1] = - (unsigned char)((mdContext->buf[i] >> 8) & 0xFF); - mdContext->digest[ii+2] = - (unsigned char)((mdContext->buf[i] >> 16) & 0xFF); - mdContext->digest[ii+3] = - (unsigned char)((mdContext->buf[i] >> 24) & 0xFF); - } -} - -/* Basic MD5 step. Transforms buf based on in. - */ -static void Transform (buf, in) -UINT4 *buf; -UINT4 *in; -{ - UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; - - /* Round 1 */ -#define S11 7 -#define S12 12 -#define S13 17 -#define S14 22 - FF ( a, b, c, d, in[ 0], S11, UL(3614090360)); /* 1 */ - FF ( d, a, b, c, in[ 1], S12, UL(3905402710)); /* 2 */ - FF ( c, d, a, b, in[ 2], S13, UL( 606105819)); /* 3 */ - FF ( b, c, d, a, in[ 3], S14, UL(3250441966)); /* 4 */ - FF ( a, b, c, d, in[ 4], S11, UL(4118548399)); /* 5 */ - FF ( d, a, b, c, in[ 5], S12, UL(1200080426)); /* 6 */ - FF ( c, d, a, b, in[ 6], S13, UL(2821735955)); /* 7 */ - FF ( b, c, d, a, in[ 7], S14, UL(4249261313)); /* 8 */ - FF ( a, b, c, d, in[ 8], S11, UL(1770035416)); /* 9 */ - FF ( d, a, b, c, in[ 9], S12, UL(2336552879)); /* 10 */ - FF ( c, d, a, b, in[10], S13, UL(4294925233)); /* 11 */ - FF ( b, c, d, a, in[11], S14, UL(2304563134)); /* 12 */ - FF ( a, b, c, d, in[12], S11, UL(1804603682)); /* 13 */ - FF ( d, a, b, c, in[13], S12, UL(4254626195)); /* 14 */ - FF ( c, d, a, b, in[14], S13, UL(2792965006)); /* 15 */ - FF ( b, c, d, a, in[15], S14, UL(1236535329)); /* 16 */ - - /* Round 2 */ -#define S21 5 -#define S22 9 -#define S23 14 -#define S24 20 - GG ( a, b, c, d, in[ 1], S21, UL(4129170786)); /* 17 */ - GG ( d, a, b, c, in[ 6], S22, UL(3225465664)); /* 18 */ - GG ( c, d, a, b, in[11], S23, UL( 643717713)); /* 19 */ - GG ( b, c, d, a, in[ 0], S24, UL(3921069994)); /* 20 */ - GG ( a, b, c, d, in[ 5], S21, UL(3593408605)); /* 21 */ - GG ( d, a, b, c, in[10], S22, UL( 38016083)); /* 22 */ - GG ( c, d, a, b, in[15], S23, UL(3634488961)); /* 23 */ - GG ( b, c, d, a, in[ 4], S24, UL(3889429448)); /* 24 */ - GG ( a, b, c, d, in[ 9], S21, UL( 568446438)); /* 25 */ - GG ( d, a, b, c, in[14], S22, UL(3275163606)); /* 26 */ - GG ( c, d, a, b, in[ 3], S23, UL(4107603335)); /* 27 */ - GG ( b, c, d, a, in[ 8], S24, UL(1163531501)); /* 28 */ - GG ( a, b, c, d, in[13], S21, UL(2850285829)); /* 29 */ - GG ( d, a, b, c, in[ 2], S22, UL(4243563512)); /* 30 */ - GG ( c, d, a, b, in[ 7], S23, UL(1735328473)); /* 31 */ - GG ( b, c, d, a, in[12], S24, UL(2368359562)); /* 32 */ - - /* Round 3 */ -#define S31 4 -#define S32 11 -#define S33 16 -#define S34 23 - HH ( a, b, c, d, in[ 5], S31, UL(4294588738)); /* 33 */ - HH ( d, a, b, c, in[ 8], S32, UL(2272392833)); /* 34 */ - HH ( c, d, a, b, in[11], S33, UL(1839030562)); /* 35 */ - HH ( b, c, d, a, in[14], S34, UL(4259657740)); /* 36 */ - HH ( a, b, c, d, in[ 1], S31, UL(2763975236)); /* 37 */ - HH ( d, a, b, c, in[ 4], S32, UL(1272893353)); /* 38 */ - HH ( c, d, a, b, in[ 7], S33, UL(4139469664)); /* 39 */ - HH ( b, c, d, a, in[10], S34, UL(3200236656)); /* 40 */ - HH ( a, b, c, d, in[13], S31, UL( 681279174)); /* 41 */ - HH ( d, a, b, c, in[ 0], S32, UL(3936430074)); /* 42 */ - HH ( c, d, a, b, in[ 3], S33, UL(3572445317)); /* 43 */ - HH ( b, c, d, a, in[ 6], S34, UL( 76029189)); /* 44 */ - HH ( a, b, c, d, in[ 9], S31, UL(3654602809)); /* 45 */ - HH ( d, a, b, c, in[12], S32, UL(3873151461)); /* 46 */ - HH ( c, d, a, b, in[15], S33, UL( 530742520)); /* 47 */ - HH ( b, c, d, a, in[ 2], S34, UL(3299628645)); /* 48 */ - - /* Round 4 */ -#define S41 6 -#define S42 10 -#define S43 15 -#define S44 21 - II ( a, b, c, d, in[ 0], S41, UL(4096336452)); /* 49 */ - II ( d, a, b, c, in[ 7], S42, UL(1126891415)); /* 50 */ - II ( c, d, a, b, in[14], S43, UL(2878612391)); /* 51 */ - II ( b, c, d, a, in[ 5], S44, UL(4237533241)); /* 52 */ - II ( a, b, c, d, in[12], S41, UL(1700485571)); /* 53 */ - II ( d, a, b, c, in[ 3], S42, UL(2399980690)); /* 54 */ - II ( c, d, a, b, in[10], S43, UL(4293915773)); /* 55 */ - II ( b, c, d, a, in[ 1], S44, UL(2240044497)); /* 56 */ - II ( a, b, c, d, in[ 8], S41, UL(1873313359)); /* 57 */ - II ( d, a, b, c, in[15], S42, UL(4264355552)); /* 58 */ - II ( c, d, a, b, in[ 6], S43, UL(2734768916)); /* 59 */ - II ( b, c, d, a, in[13], S44, UL(1309151649)); /* 60 */ - II ( a, b, c, d, in[ 4], S41, UL(4149444226)); /* 61 */ - II ( d, a, b, c, in[11], S42, UL(3174756917)); /* 62 */ - II ( c, d, a, b, in[ 2], S43, UL( 718787259)); /* 63 */ - II ( b, c, d, a, in[ 9], S44, UL(3951481745)); /* 64 */ - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; -} - -/* - *********************************************************************** - ** End of md5.c ** - ******************************** (cut) ******************************** - */ diff --git a/usr.sbin/pppd/md5.h b/usr.sbin/pppd/md5.h deleted file mode 100644 index 7492b2228e2be..0000000000000 --- a/usr.sbin/pppd/md5.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - *********************************************************************** - ** md5.h -- header file for implementation of MD5 ** - ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** - ** Created: 2/17/90 RLR ** - ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** - ** Revised (for MD5): RLR 4/27/91 ** - ** -- G modified to have y&~z instead of y&z ** - ** -- FF, GG, HH modified to add in last register done ** - ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** - ** -- distinct additive constant for each step ** - ** -- round 4 added, working mod 7 ** - *********************************************************************** - */ - -/* - *********************************************************************** - ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** - ** ** - ** License to copy and use this software is granted provided that ** - ** it is identified as the "RSA Data Security, Inc. MD5 Message- ** - ** Digest Algorithm" in all material mentioning or referencing this ** - ** software or this function. ** - ** ** - ** License is also granted to make and use derivative works ** - ** provided that such works are identified as "derived from the RSA ** - ** Data Security, Inc. MD5 Message-Digest Algorithm" in all ** - ** material mentioning or referencing the derived work. ** - ** ** - ** RSA Data Security, Inc. makes no representations concerning ** - ** either the merchantability of this software or the suitability ** - ** of this software for any particular purpose. It is provided "as ** - ** is" without express or implied warranty of any kind. ** - ** ** - ** These notices must be retained in any copies of any part of this ** - ** documentation and/or software. ** - *********************************************************************** - */ - -#ifndef __MD5_INCLUDE__ - -/* typedef a 32-bit type */ -typedef unsigned int UINT4; - -/* Data structure for MD5 (Message-Digest) computation */ -typedef struct { - UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ - UINT4 buf[4]; /* scratch buffer */ - unsigned char in[64]; /* input buffer */ - unsigned char digest[16]; /* actual digest after MD5Final call */ -} MD5_CTX; - -void MD5Init (); -void MD5Update (); -void MD5Final (); - -#define __MD5_INCLUDE__ -#endif /* __MD5_INCLUDE__ */ diff --git a/usr.sbin/pppd/ppp.h b/usr.sbin/pppd/ppp.h deleted file mode 100644 index 3d8f870bf2f3c..0000000000000 --- a/usr.sbin/pppd/ppp.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * ppp.h - PPP global declarations. - * - * Copyright (c) 1989 Carnegie Mellon University. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by Carnegie Mellon University. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * $Id: ppp.h,v 1.1 1993/11/11 03:54:25 paulus Exp $ - */ - -#ifndef __PPP_H__ -#define __PPP_H__ - -#define NPPP 1 /* One PPP interface supported (per process) */ - -/* - * Data Link Layer header = Address, Control, Protocol. - */ -#define ALLSTATIONS 0xff /* All-Stations Address */ -#define UI 0x03 /* Unnumbered Information */ -#define LCP 0xc021 /* Link Control Protocol */ -#define IPCP 0x8021 /* IP Control Protocol */ -#define UPAP 0xc023 /* User/Password Authentication Protocol */ -#define CHAP 0xc223 /* Crytpographic Handshake Protocol */ -#define LQR 0xc025 /* Link Quality Report protocol */ -#define IP_VJ_COMP 0x002d /* VJ TCP compressed IP packet */ -#define DLLHEADERLEN (sizeof (u_char) + sizeof (u_char) + sizeof (u_short)) -#define MTU 1500 /* Default MTU */ - -#endif /* __PPP_H__ */ |