summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2002-06-15 08:02:02 +0000
committerbrian <brian@cvs.openbsd.org>2002-06-15 08:02:02 +0000
commit4ad10d3037d1445664535c68d99618d832f13ff7 (patch)
tree2b39d80fbd0a653d6910428b9f67108777cfcd37
parent758fc47fd1f55010b918727451ac79d0c1119bec (diff)
Tidy up end of line whitespace
-rw-r--r--usr.sbin/ppp/ppp/README.nat10
-rw-r--r--usr.sbin/ppp/ppp/alias.c48
-rw-r--r--usr.sbin/ppp/ppp/alias.h4
-rw-r--r--usr.sbin/ppp/ppp/alias_cuseeme.c4
-rw-r--r--usr.sbin/ppp/ppp/alias_db.c66
-rw-r--r--usr.sbin/ppp/ppp/alias_irc.c18
-rw-r--r--usr.sbin/ppp/ppp/alias_local.h4
-rw-r--r--usr.sbin/ppp/ppp/alias_nbt.c86
-rw-r--r--usr.sbin/ppp/ppp/alias_proxy.c12
-rw-r--r--usr.sbin/ppp/ppp/alias_smedia.c48
-rw-r--r--usr.sbin/ppp/ppp/alias_util.c8
-rw-r--r--usr.sbin/ppp/ppp/atm.c8
-rw-r--r--usr.sbin/ppp/ppp/bundle.c12
-rw-r--r--usr.sbin/ppp/ppp/cbcp.c4
-rw-r--r--usr.sbin/ppp/ppp/ccp.c4
-rw-r--r--usr.sbin/ppp/ppp/chap.c10
-rw-r--r--usr.sbin/ppp/ppp/chap_ms.c14
-rw-r--r--usr.sbin/ppp/ppp/chap_ms.h4
-rw-r--r--usr.sbin/ppp/ppp/chat.c6
-rw-r--r--usr.sbin/ppp/ppp/command.c28
-rw-r--r--usr.sbin/ppp/ppp/datalink.c8
-rw-r--r--usr.sbin/ppp/ppp/id.c4
-rw-r--r--usr.sbin/ppp/ppp/iface.c6
-rw-r--r--usr.sbin/ppp/ppp/ip.c18
-rw-r--r--usr.sbin/ppp/ppp/ipcp.c6
-rw-r--r--usr.sbin/ppp/ppp/lcp.c4
-rw-r--r--usr.sbin/ppp/ppp/log.c4
-rw-r--r--usr.sbin/ppp/ppp/log.h4
-rw-r--r--usr.sbin/ppp/ppp/lqr.c4
-rw-r--r--usr.sbin/ppp/ppp/mbuf.c8
-rw-r--r--usr.sbin/ppp/ppp/ncpaddr.c4
-rw-r--r--usr.sbin/ppp/ppp/netgraph.c2
-rw-r--r--usr.sbin/ppp/ppp/physical.c4
-rw-r--r--usr.sbin/ppp/ppp/prompt.c4
-rw-r--r--usr.sbin/ppp/ppp/radius.c18
-rw-r--r--usr.sbin/ppp/ppp/radius.h4
-rw-r--r--usr.sbin/ppp/ppp/slcompress.c4
-rw-r--r--usr.sbin/ppp/ppp/tcpmss.c4
-rw-r--r--usr.sbin/ppp/ppp/throughput.c10
-rw-r--r--usr.sbin/ppp/ppp/timer.c10
-rw-r--r--usr.sbin/ppp/ppp/tun.c8
41 files changed, 268 insertions, 268 deletions
diff --git a/usr.sbin/ppp/ppp/README.nat b/usr.sbin/ppp/ppp/README.nat
index 7c1c06270bc..12710d10b11 100644
--- a/usr.sbin/ppp/ppp/README.nat
+++ b/usr.sbin/ppp/ppp/README.nat
@@ -22,7 +22,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
- $OpenBSD: README.nat,v 1.2 2001/11/23 11:17:03 brian Exp $
+ $OpenBSD: README.nat,v 1.3 2002/06/15 08:01:59 brian Exp $
User PPP NAT (Packet Aliasing)
@@ -203,7 +203,7 @@ packets on the private subnet will be NAT'd.
- nat port <proto> <local addr>:<port> <nat port>
-This command allows incoming traffic to <nat port> on the host
+This command allows incoming traffic to <nat port> on the host
machine to be redirected to a specific machine and port on the
local area network. One example of this would be:
@@ -229,7 +229,7 @@ case of a single, dynamically allocated IP address:
nat addr 10.0.0.8 0
The above command would redirect all incoming traffic to
-machine 10.0.0.8.
+machine 10.0.0.8.
If several address NATs specify the same public address
as follows
@@ -318,7 +318,7 @@ Version 1.6: September 18, 1996
tracert from Win95 as well as FreeBSD traceroute.
Version 1.7: January 9, 1997 (cjm)
- - Reduced malloc() activity for ICMP echo and
+ - Reduced malloc() activity for ICMP echo and
timestamp requests.
- Added handling for out-of-order IP fragments.
- Switched to differential checksum computation
@@ -356,7 +356,7 @@ Version 1.9: February 1, 1997 (Eivind Eklund <perhaps@yes.no>)
disable this for debugging) (cjm)
- Sockets will be allocated in cases where there might be
port interference with the host machine. This can be disabled
- in cases where the ppp host will be acting purely as a
+ in cases where the ppp host will be acting purely as a
masquerading router and not generate any traffic of its own.
(cjm)
diff --git a/usr.sbin/ppp/ppp/alias.c b/usr.sbin/ppp/ppp/alias.c
index 5412f6ff786..6528eea83f4 100644
--- a/usr.sbin/ppp/ppp/alias.c
+++ b/usr.sbin/ppp/ppp/alias.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias.c,v 1.18 2002/03/31 02:38:49 brian Exp $
+ * $OpenBSD: alias.c,v 1.19 2002/06/15 08:01:59 brian Exp $
*/
/*
@@ -102,7 +102,7 @@
Version 2.3 Dec 1998 (dillon)
- Major bounds checking additions, see FreeBSD/CVS
- Version 3.1 May, 2000 (salander)
+ Version 3.1 May, 2000 (salander)
- Added hooks to handle PPTP.
Version 3.2 July, 2000 (salander and satoh)
@@ -185,7 +185,7 @@ TcpMonitorOut(struct ip *pip, struct alias_link *link)
struct tcphdr *tc;
tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
-
+
switch (GetStateOut(link))
{
case ALIAS_TCP_STATE_NOT_CONNECTED:
@@ -205,7 +205,7 @@ TcpMonitorOut(struct ip *pip, struct alias_link *link)
-/* Protocol Specific Packet Aliasing Routines
+/* Protocol Specific Packet Aliasing Routines
IcmpAliasIn(), IcmpAliasIn1(), IcmpAliasIn2()
IcmpAliasOut(), IcmpAliasOut1(), IcmpAliasOut2()
@@ -357,7 +357,7 @@ IcmpAliasIn2(struct ip *pip)
original_address = GetOriginalAddress(link);
original_port = GetOriginalPort(link);
-
+
/* Adjust ICMP checksum */
sptr = (u_short *) &(ip->ip_src);
accumulate = *sptr++;
@@ -379,7 +379,7 @@ IcmpAliasIn2(struct ip *pip)
/* Un-alias address and port number of original IP packet
fragment contained in ICMP data section */
ip->ip_src = original_address;
- ud->uh_sport = original_port;
+ ud->uh_sport = original_port;
}
else if (ip->ip_p == IPPROTO_ICMP)
{
@@ -409,7 +409,7 @@ fragment contained in ICMP data section */
2);
pip->ip_dst = original_address;
-/* Un-alias address of original IP packet and sequence number of
+/* Un-alias address of original IP packet and sequence number of
embedded ICMP datagram */
ip->ip_src = original_address;
ic2->icmp_id = original_id;
@@ -551,7 +551,7 @@ IcmpAliasOut2(struct ip *pip)
alias_address = GetAliasAddress(link);
alias_port = GetAliasPort(link);
-
+
/* Adjust ICMP checksum */
sptr = (u_short *) &(ip->ip_dst);
accumulate = *sptr++;
@@ -578,7 +578,7 @@ IcmpAliasOut2(struct ip *pip)
/* Alias address and port number of original IP packet
fragment contained in ICMP data section */
ip->ip_dst = alias_address;
- ud->uh_dport = alias_port;
+ ud->uh_dport = alias_port;
}
else if (ip->ip_p == IPPROTO_ICMP)
{
@@ -613,7 +613,7 @@ fragment contained in ICMP data section */
pip->ip_src = alias_address;
}
-/* Alias address of original IP packet and sequence number of
+/* Alias address of original IP packet and sequence number of
embedded ICMP datagram */
ip->ip_dst = alias_address;
ic2->icmp_id = alias_id;
@@ -1084,7 +1084,7 @@ TcpAliasOut(struct ip *pip, int maxpacketsize)
else if (ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_1
|| ntohs(tc->th_sport) == RTSP_CONTROL_PORT_NUMBER_1
|| ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_2
- || ntohs(tc->th_sport) == RTSP_CONTROL_PORT_NUMBER_2)
+ || ntohs(tc->th_sport) == RTSP_CONTROL_PORT_NUMBER_2)
AliasHandleRtspOut(pip, link, maxpacketsize);
else if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER
|| ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER)
@@ -1175,8 +1175,8 @@ FragmentIn(struct ip *pip)
(u_short *) &original_address,
(u_short *) &pip->ip_dst,
2);
- pip->ip_dst = original_address;
-
+ pip->ip_dst = original_address;
+
return(PKT_ALIAS_OK);
}
return(PKT_ALIAS_UNRESOLVED_FRAGMENT);
@@ -1298,12 +1298,12 @@ PacketAliasIn(char *ptr, int maxpacketsize)
ClearCheckNewLink();
pip = (struct ip *) ptr;
alias_addr = pip->ip_dst;
-
+
/* Defense against mangled packets */
if (ntohs(pip->ip_len) > maxpacketsize
|| (pip->ip_hl<<2) > maxpacketsize)
return PKT_ALIAS_IGNORED;
-
+
iresult = PKT_ALIAS_IGNORED;
if ( (ntohs(pip->ip_off) & IP_OFFMASK) == 0 )
{
@@ -1483,7 +1483,7 @@ PacketUnaliasOut(char *ptr, /* valid IP packet */
link = FindUdpTcpIn(pip->ip_dst, pip->ip_src,
tc->th_dport, tc->th_sport,
IPPROTO_TCP, 0);
- else if (pip->ip_p == IPPROTO_ICMP)
+ else if (pip->ip_p == IPPROTO_ICMP)
link = FindIcmpIn(pip->ip_dst, pip->ip_src, ic->icmp_id, 0);
else
link = NULL;
@@ -1500,7 +1500,7 @@ PacketUnaliasOut(char *ptr, /* valid IP packet */
original_address = GetOriginalAddress(link);
original_port = GetOriginalPort(link);
-
+
/* Adjust TCP/UDP checksum */
sptr = (u_short *) &(pip->ip_src);
accumulate = *sptr++;
@@ -1513,7 +1513,7 @@ PacketUnaliasOut(char *ptr, /* valid IP packet */
accumulate += ud->uh_sport;
accumulate -= original_port;
ADJUST_CHECKSUM(accumulate, ud->uh_sum);
- } else {
+ } else {
accumulate += tc->th_sport;
accumulate -= original_port;
ADJUST_CHECKSUM(accumulate, tc->th_sum);
@@ -1525,13 +1525,13 @@ PacketUnaliasOut(char *ptr, /* valid IP packet */
(u_short *) &pip->ip_src,
2);
- /* Un-alias source address and port number */
+ /* Un-alias source address and port number */
pip->ip_src = original_address;
- if (pip->ip_p == IPPROTO_UDP)
- ud->uh_sport = original_port;
- else
- tc->th_sport = original_port;
-
+ if (pip->ip_p == IPPROTO_UDP)
+ ud->uh_sport = original_port;
+ else
+ tc->th_sport = original_port;
+
iresult = PKT_ALIAS_OK;
} else if (pip->ip_p == IPPROTO_ICMP) {
diff --git a/usr.sbin/ppp/ppp/alias.h b/usr.sbin/ppp/ppp/alias.h
index 9f7e7313096..c205b2e60b2 100644
--- a/usr.sbin/ppp/ppp/alias.h
+++ b/usr.sbin/ppp/ppp/alias.h
@@ -25,13 +25,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias.h,v 1.11 2001/11/23 11:17:03 brian Exp $
+ * $OpenBSD: alias.h,v 1.12 2002/06/15 08:01:59 brian Exp $
*/
/*-
* Alias.h defines the outside world interfaces for the packet aliasing
* software.
- *
+ *
* This software is placed into the public domain with no restrictions on its
* distribution.
*/
diff --git a/usr.sbin/ppp/ppp/alias_cuseeme.c b/usr.sbin/ppp/ppp/alias_cuseeme.c
index 6dc750d0b22..8c456a426dd 100644
--- a/usr.sbin/ppp/ppp/alias_cuseeme.c
+++ b/usr.sbin/ppp/ppp/alias_cuseeme.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_cuseeme.c,v 1.4 2000/11/02 00:53:47 brian Exp $
+ * $OpenBSD: alias_cuseeme.c,v 1.5 2002/06/15 08:01:59 brian Exp $
*/
#include <sys/types.h>
@@ -80,7 +80,7 @@ AliasHandleCUSeeMeOut(struct ip *pip, struct alias_link *link)
cu_link = FindUdpTcpOut(pip->ip_src, GetDestAddress(link),
ud->uh_dport, 0, IPPROTO_UDP, 1);
-
+
#ifndef NO_FW_PUNCH
if (cu_link)
PunchFWHole(cu_link);
diff --git a/usr.sbin/ppp/ppp/alias_db.c b/usr.sbin/ppp/ppp/alias_db.c
index 438f66a09f6..8a62092e474 100644
--- a/usr.sbin/ppp/ppp/alias_db.c
+++ b/usr.sbin/ppp/ppp/alias_db.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_db.c,v 1.20 2001/11/23 11:17:03 brian Exp $
+ * $OpenBSD: alias_db.c,v 1.21 2002/06/15 08:01:59 brian Exp $
*/
/*
@@ -131,12 +131,12 @@
implements static network address translation.
Version 3.2: July, 2000 (salander and satoh)
- Added FindNewPortGroup to get contiguous range of port values.
+ Added FindNewPortGroup to get contiguous range of port values.
Added QueryUdpTcpIn and QueryUdpTcpOut to look for an aliasing
link but not actually add one.
- Added FindRtspOut, which is closely derived from FindUdpTcpOut,
+ Added FindRtspOut, which is closely derived from FindUdpTcpOut,
except that the alias port (from FindNewPortGroup) is provided
as input.
@@ -333,14 +333,14 @@ struct alias_link /* Main data structure */
-/* Global Variables
+/* Global Variables
The global variables listed here are only accessed from
- within alias_db.c and so are prefixed with the static
+ within alias_db.c and so are prefixed with the static
designation.
*/
-int packetAliasMode; /* Mode flags */
+int packetAliasMode; /* Mode flags */
/* - documented in alias.h */
static struct in_addr aliasAddress; /* Address written onto source */
@@ -388,7 +388,7 @@ static FILE *monitorFile; /* File descriptor for link */
static int newDefaultLink; /* Indicates if a new aliasing */
/* link has been created after a */
/* call to PacketAliasIn/Out(). */
-
+
#ifndef NO_FW_PUNCH
static int fireWallFD = -1; /* File descriptor to be able to */
/* control firewall. Opened by */
@@ -410,7 +410,7 @@ Lookup table starting points:
incoming packets
StartPointOut() -- link table initial search point for
outgoing packets
-
+
Miscellaneous:
SeqDiff() -- difference between two TCP sequences
ShowAliasStats() -- send alias statistics to a monitor file
@@ -462,7 +462,7 @@ StartPointOut(struct in_addr src_addr, struct in_addr dst_addr,
n = src_addr.s_addr;
n += dst_addr.s_addr;
if (link_type != LINK_PPTP) {
- n += src_port;
+ n += src_port;
n += dst_port;
}
n += link_type;
@@ -528,15 +528,15 @@ Link creation and deletion:
CleanupAliasData() - remove all link chains from lookup table
IncrementalCleanup() - look for stale links in a single chain
DeleteLink() - remove link
- AddLink() - add link
- ReLink() - change link
+ AddLink() - add link
+ ReLink() - change link
Link search:
FindLinkOut() - find link for outgoing packets
FindLinkIn() - find link for incoming packets
Port search:
- FindNewPortGroup() - find an available group of ports
+ FindNewPortGroup() - find an available group of ports
*/
/* Local prototypes */
@@ -598,7 +598,7 @@ GetNewPort(struct alias_link *link, int alias_port_param)
When this parameter is GET_ALIAS_PORT, it indicates to get a randomly
selected port number.
*/
-
+
if (alias_port_param == GET_ALIAS_PORT)
{
/*
@@ -664,7 +664,7 @@ GetNewPort(struct alias_link *link, int alias_port_param)
{
if ((packetAliasMode & PKT_ALIAS_USE_SOCKETS)
&& (link->flags & LINK_PARTIALLY_SPECIFIED)
- && ((link->link_type == LINK_TCP) ||
+ && ((link->link_type == LINK_TCP) ||
(link->link_type == LINK_UDP)))
{
if (GetSocket(port_net, &link->sockfd, link->link_type))
@@ -694,7 +694,7 @@ GetNewPort(struct alias_link *link, int alias_port_param)
}
-static u_short
+static u_short
GetSocket(u_short port_net, int *sockfd, int link_type)
{
int err;
@@ -744,7 +744,7 @@ GetSocket(u_short port_net, int *sockfd, int link_type)
}
-/* FindNewPortGroup() returns a base port number for an available
+/* FindNewPortGroup() returns a base port number for an available
range of contiguous port numbers. Note that if a port number
is already in use, that does not mean that it cannot be used by
another link concurrently. This is because FindNewPortGroup()
@@ -755,8 +755,8 @@ FindNewPortGroup(struct in_addr dst_addr,
struct in_addr alias_addr,
u_short src_port,
u_short dst_port,
- u_short port_count,
- u_char proto,
+ u_short port_count,
+ u_char proto,
u_char align)
{
int i, j;
@@ -813,7 +813,7 @@ FindNewPortGroup(struct in_addr dst_addr,
struct alias_link *search_result;
- for (j = 0; j < port_count; j++)
+ for (j = 0; j < port_count; j++)
if (0 != (search_result = FindLinkIn(dst_addr, alias_addr,
dst_port, htons(port_sys + j),
link_type, 0)))
@@ -886,7 +886,7 @@ IncrementalCleanup(void)
{
struct tcp_dat *tcp_aux;
- tcp_aux = link->data.tcp;
+ tcp_aux = link->data.tcp;
if (tcp_aux->state.in != ALIAS_TCP_STATE_CONNECTED
|| tcp_aux->state.out != ALIAS_TCP_STATE_CONNECTED)
{
@@ -1114,12 +1114,12 @@ AddLink(struct in_addr src_addr,
}
/* Set up pointers for output lookup table */
- start_point = StartPointOut(src_addr, dst_addr,
+ start_point = StartPointOut(src_addr, dst_addr,
src_port, dst_port, link_type);
LIST_INSERT_HEAD(&linkTableOut[start_point], link, list_out);
/* Set up pointers for input lookup table */
- start_point = StartPointIn(alias_addr, link->alias_port, link_type);
+ start_point = StartPointIn(alias_addr, link->alias_port, link_type);
LIST_INSERT_HEAD(&linkTableIn[start_point], link, list_in);
}
else
@@ -1291,7 +1291,7 @@ _FindLinkIn(struct in_addr dst_addr,
if (!(flags & LINK_PARTIALLY_SPECIFIED))
{
if (link->alias_addr.s_addr == alias_addr.s_addr
- && link->alias_port == alias_port
+ && link->alias_port == alias_port
&& link->dst_addr.s_addr == dst_addr.s_addr
&& link->dst_port == dst_port
&& link->link_type == link_type)
@@ -1620,7 +1620,7 @@ FindUdpTcpIn(struct in_addr dst_addr,
}
-struct alias_link *
+struct alias_link *
FindUdpTcpOut(struct in_addr src_addr,
struct in_addr dst_addr,
u_short src_port,
@@ -1752,7 +1752,7 @@ FindPptpInByPeerCallId(struct in_addr dst_addr,
}
-struct alias_link *
+struct alias_link *
FindRtspOut(struct in_addr src_addr,
struct in_addr dst_addr,
u_short src_port,
@@ -1795,7 +1795,7 @@ struct in_addr
FindOriginalAddress(struct in_addr alias_addr)
{
struct alias_link *link;
-
+
link = FindLinkIn(nullAddress, alias_addr,
0, 0, LINK_ADDR, 0);
if (link == NULL)
@@ -1828,7 +1828,7 @@ struct in_addr
FindAliasAddress(struct in_addr original_addr)
{
struct alias_link *link;
-
+
link = FindLinkOut(original_addr, nullAddress,
0, 0, LINK_ADDR, 0);
if (link == NULL)
@@ -2060,7 +2060,7 @@ GetDeltaAckIn(struct ip *pip, struct alias_link *link)
/*
Find out how much the ACK number has been altered for an incoming
TCP packet. To do this, a circular list of ACK numbers where the TCP
-packet size was altered is searched.
+packet size was altered is searched.
*/
int i;
@@ -2111,7 +2111,7 @@ GetDeltaSeqOut(struct ip *pip, struct alias_link *link)
/*
Find out how much the sequence number has been altered for an outgoing
TCP packet. To do this, a circular list of ACK numbers where the TCP
-packet size was altered is searched.
+packet size was altered is searched.
*/
int i;
@@ -2400,7 +2400,7 @@ PacketAliasRedirectPort(struct in_addr src_addr, u_short src_port,
#ifdef DEBUG
else
{
- fprintf(stderr, "PacketAliasRedirectPort(): "
+ fprintf(stderr, "PacketAliasRedirectPort(): "
"call to AddLink() failed\n");
}
#endif
@@ -2459,7 +2459,7 @@ PacketAliasRedirectProto(struct in_addr src_addr,
#ifdef DEBUG
else
{
- fprintf(stderr, "PacketAliasRedirectProto(): "
+ fprintf(stderr, "PacketAliasRedirectProto(): "
"call to AddLink() failed\n");
}
#endif
@@ -2485,7 +2485,7 @@ PacketAliasRedirectAddr(struct in_addr src_addr,
#ifdef DEBUG
else
{
- fprintf(stderr, "PacketAliasRedirectAddr(): "
+ fprintf(stderr, "PacketAliasRedirectAddr(): "
"call to AddLink() failed\n");
}
#endif
@@ -2788,7 +2788,7 @@ static void
ClearAllFWHoles(void) {
struct ip_fw rule; /* On-the-fly built rule */
int i;
-
+
if (fireWallFD < 0)
return;
diff --git a/usr.sbin/ppp/ppp/alias_irc.c b/usr.sbin/ppp/ppp/alias_irc.c
index c8bbe199839..f0a29eef751 100644
--- a/usr.sbin/ppp/ppp/alias_irc.c
+++ b/usr.sbin/ppp/ppp/alias_irc.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_irc.c,v 1.10 2001/11/23 11:17:03 brian Exp $
+ * $OpenBSD: alias_irc.c,v 1.11 2002/06/15 08:01:59 brian Exp $
*/
/* Alias_irc.c intercepts packages contain IRC CTCP commands, and
@@ -48,7 +48,7 @@
/* Includes */
#include <ctype.h>
-#include <stdio.h>
+#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in_systm.h>
@@ -68,14 +68,14 @@ AliasHandleIrcOut(struct ip *pip, /* IP packet to examine */
struct alias_link *link, /* Which link are we on? */
int maxsize /* Maximum size of IP packet including headers */
)
-{
+{
int hlen, tlen, dlen;
struct in_addr true_addr;
u_short true_port;
char *sptr;
struct tcphdr *tc;
int i; /* Iterator through the source */
-
+
/* Calculate data length of TCP packet */
tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
hlen = (pip->ip_hl + tc->th_off) << 2;
@@ -87,7 +87,7 @@ AliasHandleIrcOut(struct ip *pip, /* IP packet to examine */
return;
/* Place string pointer at beginning of data */
- sptr = (char *) pip;
+ sptr = (char *) pip;
sptr += hlen;
maxsize -= hlen; /* We're interested in maximum size of data, not packet */
@@ -230,7 +230,7 @@ lFOUND_CTCP:
{
struct alias_link *dcc_link;
struct in_addr destaddr;
-
+
true_port = htons(org_port);
true_addr.s_addr = htonl(org_addr);
@@ -261,7 +261,7 @@ lFOUND_CTCP:
alias_address = GetAliasAddress(link);
n = snprintf(&newpacket[iCopy],
- sizeof(newpacket)-iCopy,
+ sizeof(newpacket)-iCopy,
"%lu ", (u_long)htonl(alias_address.s_addr));
if( n < 0 ) {
DBprintf(("DCC packet construct failure.\n"));
@@ -273,7 +273,7 @@ lFOUND_CTCP:
}
alias_port = GetAliasPort(dcc_link);
n = snprintf(&newpacket[iCopy],
- sizeof(newpacket)-iCopy,
+ sizeof(newpacket)-iCopy,
"%u", htons(alias_port) );
if( n < 0 ) {
DBprintf(("DCC packet construct failure.\n"));
@@ -320,7 +320,7 @@ lFOUND_CTCP:
/* Revise IP header */
{
u_short new_len;
-
+
new_len = htons(hlen + iCopy + copyat);
DifferentialChecksum(&pip->ip_sum,
&new_len,
diff --git a/usr.sbin/ppp/ppp/alias_local.h b/usr.sbin/ppp/ppp/alias_local.h
index d4c5d9e6b30..9e6dfeab80d 100644
--- a/usr.sbin/ppp/ppp/alias_local.h
+++ b/usr.sbin/ppp/ppp/alias_local.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_local.h,v 1.13 2001/11/23 11:17:03 brian Exp $
+ * $OpenBSD: alias_local.h,v 1.14 2002/06/15 08:01:59 brian Exp $
*/
/*
@@ -38,7 +38,7 @@
* This software is placed into the public domain with no restrictions
* on its distribution.
*
- * Initial version: August, 1996 (cjm)
+ * Initial version: August, 1996 (cjm)
*
* <updated several times by original author and Eivind Eklund>
*/
diff --git a/usr.sbin/ppp/ppp/alias_nbt.c b/usr.sbin/ppp/ppp/alias_nbt.c
index c84daca05a9..ea117b8938d 100644
--- a/usr.sbin/ppp/ppp/alias_nbt.c
+++ b/usr.sbin/ppp/ppp/alias_nbt.c
@@ -24,10 +24,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_nbt.c,v 1.7 2001/06/07 09:32:55 brian Exp $
+ * $OpenBSD: alias_nbt.c,v 1.8 2002/06/15 08:01:59 brian Exp $
*
* TODO:
- * oClean up.
+ * oClean up.
* oConsidering for word alignment for other platform.
*/
/*
@@ -41,7 +41,7 @@
/* Includes */
#include <ctype.h>
-#include <stdio.h>
+#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in_systm.h>
@@ -113,7 +113,7 @@ static void PrintRcode( u_char rcode ) {
default:
printf("\n???=%0x\n", rcode );
- }
+ }
}
#endif
@@ -142,7 +142,7 @@ static u_char *AliasHandleName ( u_char *p, char *pmax ) {
compress = 1;
else
compress = 0;
-
+
/* Get next length field */
p = (u_char *)(p + (*p & 0x3f) + 1);
if ((char *)p > pmax) {
@@ -183,7 +183,7 @@ static u_char *AliasHandleName ( u_char *p, char *pmax ) {
return ((u_char *)p);
}
-/*
+/*
* NetBios Datagram Handler (IP/UDP)
*/
#define DGM_DIRECT_UNIQ 0x10
@@ -204,7 +204,7 @@ int AliasHandleUdpNbt(
NbtDataHeader *ndh;
u_char *p = NULL;
char *pmax;
-
+
/* Calculate data length of UDP packet */
uh = (struct udphdr *) ((char *) pip + (pip->ip_hl << 2));
pmax = (char *)uh + ntohs( uh->uh_ulen );
@@ -327,9 +327,9 @@ typedef struct {
} NBTNsRNB;
static u_char *
-AliasHandleResourceNB(
+AliasHandleResourceNB(
NBTNsResource *q,
- char *pmax,
+ char *pmax,
NBTArguments *nbtarg)
{
NBTNsRNB *nb;
@@ -396,7 +396,7 @@ typedef struct {
} NBTNsResourceA;
static u_char *
-AliasHandleResourceA(
+AliasHandleResourceA(
NBTNsResource *q,
char *pmax,
NBTArguments *nbtarg)
@@ -453,8 +453,8 @@ typedef struct {
} NBTNsResourceNULL;
static u_char *
-AliasHandleResourceNULL(
- NBTNsResource *q,
+AliasHandleResourceNULL(
+ NBTNsResource *q,
char *pmax,
NBTArguments *nbtarg)
{
@@ -486,7 +486,7 @@ AliasHandleResourceNULL(
}
static u_char *
-AliasHandleResourceNS(
+AliasHandleResourceNS(
NBTNsResource *q,
char *pmax,
NBTArguments *nbtarg)
@@ -542,10 +542,10 @@ AliasHandleResourceNBSTAT(
static u_char *
AliasHandleResource(
- u_short count,
+ u_short count,
NBTNsResource *q,
char *pmax,
- NBTArguments
+ NBTArguments
*nbtarg)
{
while ( count != 0 ) {
@@ -561,45 +561,45 @@ AliasHandleResource(
/* Type and Class filed */
switch ( ntohs(q->type) ) {
case RR_TYPE_NB:
- q = (NBTNsResource *)AliasHandleResourceNB(
+ q = (NBTNsResource *)AliasHandleResourceNB(
q,
pmax,
- nbtarg
+ nbtarg
);
break;
- case RR_TYPE_A:
- q = (NBTNsResource *)AliasHandleResourceA(
- q,
- pmax,
+ case RR_TYPE_A:
+ q = (NBTNsResource *)AliasHandleResourceA(
+ q,
+ pmax,
nbtarg
);
break;
case RR_TYPE_NS:
- q = (NBTNsResource *)AliasHandleResourceNS(
+ q = (NBTNsResource *)AliasHandleResourceNS(
q,
- pmax,
- nbtarg
+ pmax,
+ nbtarg
);
break;
case RR_TYPE_NULL:
- q = (NBTNsResource *)AliasHandleResourceNULL(
- q,
- pmax,
- nbtarg
+ q = (NBTNsResource *)AliasHandleResourceNULL(
+ q,
+ pmax,
+ nbtarg
);
break;
case RR_TYPE_NBSTAT:
q = (NBTNsResource *)AliasHandleResourceNBSTAT(
q,
- pmax,
+ pmax,
nbtarg
);
break;
- default:
+ default:
#ifdef DEBUG
printf(
- "\nUnknown Type of Resource %0x\n",
- ntohs(q->type)
+ "\nUnknown Type of Resource %0x\n",
+ ntohs(q->type)
);
#endif
break;
@@ -624,7 +624,7 @@ int AliasHandleUdpNbtNS(
char *pmax;
NBTArguments nbtarg;
- /* Set up Common Parameter */
+ /* Set up Common Parameter */
nbtarg.oldaddr = *alias_address;
nbtarg.oldport = *alias_port;
nbtarg.newaddr = *original_address;
@@ -642,7 +642,7 @@ int AliasHandleUdpNbtNS(
#ifdef DEBUG
printf(" [%s] ID=%02x, op=%01x, flag=%02x, rcode=%01x, qd=%04x"
- ", an=%04x, ns=%04x, ar=%04x, [%d]-->",
+ ", an=%04x, ns=%04x, ar=%04x, [%d]-->",
nsh->dir ? "Response": "Request",
nsh->nametrid,
nsh->opcode,
@@ -661,8 +661,8 @@ int AliasHandleUdpNbtNS(
p = AliasHandleQuestion(
ntohs(nsh->qdcount),
(NBTNsQuestion *)p,
- pmax,
- &nbtarg
+ pmax,
+ &nbtarg
);
}
@@ -671,18 +671,18 @@ int AliasHandleUdpNbtNS(
p = AliasHandleResource(
ntohs(nsh->ancount),
(NBTNsResource *)p,
- pmax,
- &nbtarg
+ pmax,
+ &nbtarg
);
}
/* Authority Resource Recodrs */
if (ntohs(nsh->nscount) !=0 ) {
p = AliasHandleResource(
- ntohs(nsh->nscount),
+ ntohs(nsh->nscount),
(NBTNsResource *)p,
- pmax,
- &nbtarg
+ pmax,
+ &nbtarg
);
}
@@ -691,8 +691,8 @@ int AliasHandleUdpNbtNS(
p = AliasHandleResource(
ntohs(nsh->arcount),
(NBTNsResource *)p,
- pmax,
- &nbtarg
+ pmax,
+ &nbtarg
);
}
diff --git a/usr.sbin/ppp/ppp/alias_proxy.c b/usr.sbin/ppp/ppp/alias_proxy.c
index e589e1aebf9..0825bf01342 100644
--- a/usr.sbin/ppp/ppp/alias_proxy.c
+++ b/usr.sbin/ppp/ppp/alias_proxy.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_proxy.c,v 1.10 2001/11/23 11:17:03 brian Exp $
+ * $OpenBSD: alias_proxy.c,v 1.11 2002/06/15 08:01:59 brian Exp $
*/
/* file: alias_proxy.c
@@ -38,7 +38,7 @@
presently supported: addition of a [DEST addr port] string at the
beginning a of tcp stream, or inclusion of an optional field
in the IP header.
-
+
There is one public API function:
PacketAliasProxyRule() -- Adds and deletes proxy
@@ -300,7 +300,7 @@ ProxyEncodeTcpStream(struct alias_link *link,
/* Translate destination address and port to string form */
snprintf(buffer, sizeof(buffer) - 2, "[DEST %s %d]",
inet_ntoa(GetProxyAddress (link)), (u_int) ntohs(GetProxyPort (link)));
-
+
/* Pad string out to a multiple of two in length */
slen = strlen(buffer);
switch (slen % 2)
@@ -662,7 +662,7 @@ PacketAliasProxyRule(const char *cmd)
else
{
*p = ' ';
-
+
n = sscanf(token, "%s %s", s, str_server_port);
if (n != 2)
return -1;
@@ -752,7 +752,7 @@ PacketAliasProxyRule(const char *cmd)
src_addr = addr;
src_mask = mask;
}
- else
+ else
{
dst_addr = addr;
dst_mask = mask;
@@ -798,7 +798,7 @@ PacketAliasProxyRule(const char *cmd)
}
if (strlen(str_server_port) != 0)
- {
+ {
int err;
err = IpPort(str_server_port, proto, &server_port);
diff --git a/usr.sbin/ppp/ppp/alias_smedia.c b/usr.sbin/ppp/ppp/alias_smedia.c
index b7751372c63..0004ced4331 100644
--- a/usr.sbin/ppp/ppp/alias_smedia.c
+++ b/usr.sbin/ppp/ppp/alias_smedia.c
@@ -62,24 +62,24 @@
* Junichi SATOH <junichi@astec.co.jp>
* <junichi@junichi.org>
*
- * $OpenBSD: alias_smedia.c,v 1.5 2002/06/14 21:35:01 todd Exp $
+ * $OpenBSD: alias_smedia.c,v 1.6 2002/06/15 08:02:00 brian Exp $
*/
/*
Alias_smedia.c is meant to contain the aliasing code for streaming media
protocols. It performs special processing for RSTP sessions under TCP.
Specifically, when a SETUP request is sent by a client, or a 200 reply
- is sent by a server, it is intercepted and modified. The address is
+ is sent by a server, it is intercepted and modified. The address is
changed to the gateway machine and an aliasing port is used.
- More specifically, the "client_port" configuration parameter is
- parsed for SETUP requests. The "server_port" configuration parameter is
+ More specifically, the "client_port" configuration parameter is
+ parsed for SETUP requests. The "server_port" configuration parameter is
parsed for 200 replies eminating from a server. This is intended to handle
the unicast case.
RTSP also allows a redirection of a stream to another client by using the
"destination" configuration parameter. The destination config parm would
- indicate a different IP address. This function is NOT supported by the
+ indicate a different IP address. This function is NOT supported by the
RTSP translation code below.
The RTSP multicast functions without any address translation intervention.
@@ -94,7 +94,7 @@
changes of sequence and acknowledgment numbers, since the client
machine is totally unaware of the modification to the TCP stream.
- Initial version: May, 2000 (eds)
+ Initial version: May, 2000 (eds)
*/
#include <stdio.h>
@@ -108,8 +108,8 @@
#include "alias_local.h"
-#define RTSP_CONTROL_PORT_NUMBER_1 554
-#define RTSP_CONTROL_PORT_NUMBER_2 7070
+#define RTSP_CONTROL_PORT_NUMBER_1 554
+#define RTSP_CONTROL_PORT_NUMBER_2 7070
#define RTSP_PORT_GROUP 2
#define ISDIGIT(a) (((a) >= '0') && ((a) <= '9'))
@@ -151,7 +151,7 @@ alias_rtsp_out(struct ip *pip,
char newdata[2048], *port_data, *port_newdata, stemp[80];
int links_created = 0, pkt_updated = 0;
struct alias_link *rtsp_link = NULL;
- struct in_addr null_addr;
+ struct in_addr null_addr;
/* Calculate data length of TCP packet */
tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
@@ -216,15 +216,15 @@ alias_rtsp_out(struct ip *pip,
if (!links_created) {
- links_created = 1;
+ links_created = 1;
/* Find an even numbered port number base that
satisfies the contiguous number of ports we need */
null_addr.s_addr = 0;
if (0 == (salias = FindNewPortGroup(null_addr,
FindAliasAddress(pip->ip_src),
- sport, 0,
- RTSP_PORT_GROUP,
- IPPROTO_UDP, 1))) {
+ sport, 0,
+ RTSP_PORT_GROUP,
+ IPPROTO_UDP, 1))) {
#ifdef DEBUG
fprintf(stderr,
"PacketAlias/RTSP: Cannot find contiguous RTSP data ports\n");
@@ -360,7 +360,7 @@ alias_pna_out(struct ip *pip,
}
work += ntohs(msg_len);
}
-
+
return 0;
}
@@ -384,8 +384,8 @@ AliasHandleRtspOut(struct ip *pip, struct alias_link *link, int maxpacketsize)
data += hlen;
/* When aliasing a client, check for the SETUP request */
- if ((ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_1) ||
- (ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_2)) {
+ if ((ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_1) ||
+ (ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_2)) {
if (dlen >= strlen(setup)) {
if (memcmp(data, setup, strlen(setup)) == 0) {
@@ -406,23 +406,23 @@ AliasHandleRtspOut(struct ip *pip, struct alias_link *link, int maxpacketsize)
if (dlen >= strlen(str200)) {
- for (parseOk = 0, i = 0;
- i <= dlen - strlen(str200);
+ for (parseOk = 0, i = 0;
+ i <= dlen - strlen(str200);
i++) {
- if (memcmp(&data[i], str200, strlen(str200)) == 0) {
- parseOk = 1;
+ if (memcmp(&data[i], str200, strlen(str200)) == 0) {
+ parseOk = 1;
break;
}
}
- if (parseOk) {
+ if (parseOk) {
- i += strlen(str200); /* skip string found */
+ i += strlen(str200); /* skip string found */
while(data[i] == ' ') /* skip blank(s) */
i++;
-
+
if ((dlen - i) >= strlen(okstr)) {
- if (memcmp(&data[i], okstr, strlen(okstr)) == 0)
+ if (memcmp(&data[i], okstr, strlen(okstr)) == 0)
alias_rtsp_out(pip, link, data, server_port_str);
}
diff --git a/usr.sbin/ppp/ppp/alias_util.c b/usr.sbin/ppp/ppp/alias_util.c
index 0a609b16901..15b63ddba9f 100644
--- a/usr.sbin/ppp/ppp/alias_util.c
+++ b/usr.sbin/ppp/ppp/alias_util.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_util.c,v 1.6 2001/11/23 11:17:03 brian Exp $
+ * $OpenBSD: alias_util.c,v 1.7 2002/06/15 08:02:00 brian Exp $
*/
/*
@@ -47,7 +47,7 @@ been zeroed out. If the checksum word is filled with the proper value,
then these routines will give a result of zero (useful for testing
purposes);
*/
-
+
#include <sys/types.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
@@ -88,7 +88,7 @@ IpChecksum(struct ip *pip)
}
-u_short
+u_short
TcpChecksum(struct ip *pip)
{
u_short *ptr;
@@ -101,7 +101,7 @@ TcpChecksum(struct ip *pip)
tc = (struct tcphdr *) ((char *) pip + nhdr);
ptr = (u_short *) tc;
-
+
/* Add up TCP header and data */
nbytes = ntcp;
sum = 0;
diff --git a/usr.sbin/ppp/ppp/atm.c b/usr.sbin/ppp/ppp/atm.c
index 2979f4277f0..ab184b7dcce 100644
--- a/usr.sbin/ppp/ppp/atm.c
+++ b/usr.sbin/ppp/ppp/atm.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: atm.c,v 1.8 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: atm.c,v 1.9 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/types.h>
@@ -170,7 +170,7 @@ atm_CreateDevice(struct physical *p, const char *iface, unsigned vpi,
{
struct atmdevice *dev;
struct sockaddr_natm sock;
-
+
if ((dev = calloc(1, sizeof *dev)) == NULL) {
log_Printf(LogWARN, "%s: Cannot allocate an atm device: %s\n",
p->link.name, strerror(errno));
@@ -214,14 +214,14 @@ atm_Create(struct physical *p)
&& p->name.full[PPPOA_LEN] == ':') {
char iface[25];
unsigned vci, vpi;
-
+
if (sscanf(p->name.full + PPPOA_LEN + 1, "%25[A-Za-z0-9]:%u.%u", iface,
&vpi, &vci) != 3) {
log_Printf(LogWARN, "Malformed ATM device name \'%s\', "
"PPPoA:if:vpi.vci expected\n", p->name.full);
return NULL;
}
-
+
dev = atm_CreateDevice(p, iface, vpi, vci);
}
diff --git a/usr.sbin/ppp/ppp/bundle.c b/usr.sbin/ppp/ppp/bundle.c
index 803ba0ac1f9..049b547fced 100644
--- a/usr.sbin/ppp/ppp/bundle.c
+++ b/usr.sbin/ppp/ppp/bundle.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: bundle.c,v 1.65 2002/05/27 23:19:38 brian Exp $
+ * $OpenBSD: bundle.c,v 1.66 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -191,7 +191,7 @@ bundle_Notify(struct bundle *bundle, char c)
}
}
-static void
+static void
bundle_ClearQueues(void *v)
{
struct bundle *bundle = (struct bundle *)v;
@@ -289,7 +289,7 @@ bundle_LayerUp(void *v, struct fsm *fp)
#ifndef NORADIUS
if (bundle->radius.sessiontime)
bundle_StartSessionTimer(bundle, 0);
-#endif
+#endif
bundle_StartIdleTimer(bundle, 0);
mp_CheckAutoloadTimer(&fp->bundle->ncp.mp);
}
@@ -621,7 +621,7 @@ bundle_DescriptorRead(struct fdescriptor *d, struct bundle *bundle,
/*
* Drop the packet. If we were to queue it, we'd just end up with
* a pile of timed-out data in our output queue by the time we get
- * around to actually dialing. We'd also prematurely reach the
+ * around to actually dialing. We'd also prematurely reach the
* threshold at which we stop select()ing to read() the tun
* device - breaking auto-dial.
*/
@@ -1145,7 +1145,7 @@ bundle_ShowStatus(struct cmdargs const *arg)
return 0;
}
-static void
+static void
bundle_IdleTimeout(void *v)
{
struct bundle *bundle = (struct bundle *)v;
@@ -1214,7 +1214,7 @@ bundle_RemainingIdleTime(struct bundle *bundle)
#ifndef NORADIUS
-static void
+static void
bundle_SessionTimeout(void *v)
{
struct bundle *bundle = (struct bundle *)v;
diff --git a/usr.sbin/ppp/ppp/cbcp.c b/usr.sbin/ppp/ppp/cbcp.c
index ebf2a5799dc..5e52ce267ea 100644
--- a/usr.sbin/ppp/ppp/cbcp.c
+++ b/usr.sbin/ppp/ppp/cbcp.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: cbcp.c,v 1.15 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: cbcp.c,v 1.16 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -75,7 +75,7 @@ static void cbcp_SendReq(struct cbcp *);
static void cbcp_SendResponse(struct cbcp *);
static void cbcp_SendAck(struct cbcp *);
-static void
+static void
cbcp_Timeout(void *v)
{
struct cbcp *cbcp = (struct cbcp *)v;
diff --git a/usr.sbin/ppp/ppp/ccp.c b/usr.sbin/ppp/ppp/ccp.c
index 3899c9322e9..334d7da196e 100644
--- a/usr.sbin/ppp/ppp/ccp.c
+++ b/usr.sbin/ppp/ppp/ccp.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: ccp.c,v 1.28 2002/06/15 01:33:23 brian Exp $
+ * $OpenBSD: ccp.c,v 1.29 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -452,7 +452,7 @@ CcpLayerDown(struct fsm *fp)
ccp->out.algorithm = -1;
}
ccp->his_reject = ccp->my_reject = 0;
-
+
while (ccp->out.opt) {
next = ccp->out.opt->next;
free(ccp->out.opt);
diff --git a/usr.sbin/ppp/ppp/chap.c b/usr.sbin/ppp/ppp/chap.c
index ce78843bed5..5701a431aa2 100644
--- a/usr.sbin/ppp/ppp/chap.c
+++ b/usr.sbin/ppp/ppp/chap.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: chap.c,v 1.34 2002/06/15 01:33:23 brian Exp $
+ * $OpenBSD: chap.c,v 1.35 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -217,7 +217,7 @@ chap_BuildAnswer(char *name, char *key, u_char id, char *challenge, u_char type
GetMasterKey(pwdhashhash, ntresponse, MPPE_MasterKey); /* XXX Global ! */
/* Generate AUTHRESPONSE to verify on auth success */
- GenerateAuthenticatorResponse(expkey, klen * 2, ntresponse,
+ GenerateAuthenticatorResponse(expkey, klen * 2, ntresponse,
peerchallenge + 1, challenge + 1, name, nlen,
authresponse);
@@ -605,7 +605,7 @@ chap_Failure(struct authinfo *authp)
ptr += sprintf(buf, "E=691 R=0 C=");
for (i=0; i<16; i++)
ptr += sprintf(ptr, "%02X", *(auth2chap(authp)->challenge.local+1+i));
-
+
sprintf(ptr, " V=3 M=Invalid!");
msg = buf;
} else
@@ -776,7 +776,7 @@ chap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
ans[alen+1] = '\0';
bp = auth_ReadName(&chap->auth, bp, len);
#ifndef NODES
- lanman = p->link.lcp.want_authtype == 0x80 &&
+ lanman = p->link.lcp.want_authtype == 0x80 &&
alen == 49 && ans[alen] == 0;
#endif
break;
@@ -930,7 +930,7 @@ chap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
datalink_AuthNotOk(p->dl);
log_Printf(LogWARN, "CHAP81: AuthenticatorResponse: (%.42s)"
" != ans: (%.42s)\n", chap->authresponse, ans);
-
+
} else {
/* Successful login */
MPPE_MasterKeyValid = 1; /* XXX Global ! */
diff --git a/usr.sbin/ppp/ppp/chap_ms.c b/usr.sbin/ppp/ppp/chap_ms.c
index cb8e48b4917..1f153a60d88 100644
--- a/usr.sbin/ppp/ppp/chap_ms.c
+++ b/usr.sbin/ppp/ppp/chap_ms.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: chap_ms.c,v 1.11 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: chap_ms.c,v 1.12 2002/06/15 08:02:00 brian Exp $
*/
#include <ctype.h>
@@ -132,7 +132,7 @@ ChallengeResponse(u_char *challenge, u_char *pwHash, u_char *response)
void
NtPasswordHash(char *key, int keylen, char *hash)
-{
+{
MD4_CTX MD4context;
MD4Init(&MD4context);
@@ -142,7 +142,7 @@ NtPasswordHash(char *key, int keylen, char *hash)
void
HashNtPasswordHash(char *hash, char *hashhash)
-{
+{
MD4_CTX MD4context;
MD4Init(&MD4context);
@@ -159,14 +159,14 @@ ChallengeHash(char *PeerChallenge, char *AuthenticatorChallenge,
char *Name;
Name = strrchr(UserName, '\\');
- if(NULL == Name)
+ if(NULL == Name)
Name = UserName;
else
Name++;
SHA1_Init(&Context);
- SHA1_Update(&Context, PeerChallenge, 16);
+ SHA1_Update(&Context, PeerChallenge, 16);
SHA1_Update(&Context, AuthenticatorChallenge, 16);
SHA1_Update(&Context, Name, strlen(Name));
@@ -254,7 +254,7 @@ GenerateAuthenticatorResponse(char *Password, int PasswordLen,
SHA1_Update(&Context, NTResponse, 24);
SHA1_Update(&Context, Magic1, 39);
SHA1_Final(Digest, &Context);
- ChallengeHash(PeerChallenge, AuthenticatorChallenge, UserName, UserNameLen,
+ ChallengeHash(PeerChallenge, AuthenticatorChallenge, UserName, UserNameLen,
Challenge);
SHA1_Init(&Context);
SHA1_Update(&Context, Digest, 20);
@@ -275,7 +275,7 @@ GenerateAuthenticatorResponse(char *Password, int PasswordLen,
AuthenticatorResponse[i] = toupper(AuthenticatorResponse[i]);
}
-
+
void
GetMasterKey(char *PasswordHashHash, char *NTResponse, char *MasterKey)
{
diff --git a/usr.sbin/ppp/ppp/chap_ms.h b/usr.sbin/ppp/ppp/chap_ms.h
index ac120601246..20e2c796949 100644
--- a/usr.sbin/ppp/ppp/chap_ms.h
+++ b/usr.sbin/ppp/ppp/chap_ms.h
@@ -26,13 +26,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: chap_ms.h,v 1.6 2001/08/10 17:43:40 brian Exp $
+ * $OpenBSD: chap_ms.h,v 1.7 2002/06/15 08:02:00 brian Exp $
*/
/* Max # of (Unicode) chars in an NT password */
#define MAX_NT_PASSWORD 256
-/* Don't rely on sizeof(MS_ChapResponse) in case of struct padding */
+/* Don't rely on sizeof(MS_ChapResponse) in case of struct padding */
#define MS_CHAP_RESPONSE_LEN 49
#define CHAP81_RESPONSE_LEN 49
#define CHAP81_NTRESPONSE_LEN 24
diff --git a/usr.sbin/ppp/ppp/chat.c b/usr.sbin/ppp/ppp/chat.c
index 1eb43c440b7..685b54e0dfd 100644
--- a/usr.sbin/ppp/ppp/chat.c
+++ b/usr.sbin/ppp/ppp/chat.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: chat.c,v 1.19 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: chat.c,v 1.20 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -449,7 +449,7 @@ chat_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
/* Got it ! */
timer_Stop(&c->timeout);
if (memchr(begin + c->arglen - 1, '\n',
- c->bufend - begin - c->arglen + 1) == NULL) {
+ c->bufend - begin - c->arglen + 1) == NULL) {
/* force it into the log */
end = c->bufend;
c->bufend = begin + c->arglen;
@@ -467,7 +467,7 @@ chat_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
if (!strncmp(begin, c->abort.string[n].data,
c->abort.string[n].len)) {
if (memchr(begin + c->abort.string[n].len - 1, '\n',
- c->bufend - begin - c->abort.string[n].len + 1) == NULL) {
+ c->bufend - begin - c->abort.string[n].len + 1) == NULL) {
/* force it into the log */
end = c->bufend;
c->bufend = begin + c->abort.string[n].len;
diff --git a/usr.sbin/ppp/ppp/command.c b/usr.sbin/ppp/ppp/command.c
index c5f7199762c..d24da1d7da5 100644
--- a/usr.sbin/ppp/ppp/command.c
+++ b/usr.sbin/ppp/ppp/command.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: command.c,v 1.76 2002/06/15 01:33:23 brian Exp $
+ * $OpenBSD: command.c,v 1.77 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -314,7 +314,7 @@ RenameCommand(struct cmdargs const *arg)
if (bundle_RenameDatalink(arg->bundle, arg->cx, arg->argv[arg->argn]))
return 0;
- log_Printf(LogWARN, "%s -> %s: target name already exists\n",
+ log_Printf(LogWARN, "%s -> %s: target name already exists\n",
arg->cx->name, arg->argv[arg->argn]);
return 1;
}
@@ -527,7 +527,7 @@ command_Expand(char **nargv, int argc, char const *const *oargv,
nargv[arg] = subst(nargv[arg], "COMPILATIONDATE", __DATE__);
nargv[arg] = substip(nargv[arg], "DNS0", bundle->ncp.ipcp.ns.dns[0]);
nargv[arg] = substip(nargv[arg], "DNS1", bundle->ncp.ipcp.ns.dns[1]);
- nargv[arg] = subst(nargv[arg], "ENDDISC",
+ nargv[arg] = subst(nargv[arg], "ENDDISC",
mp_Enddisc(bundle->ncp.mp.cfg.enddisc.class,
bundle->ncp.mp.cfg.enddisc.address,
bundle->ncp.mp.cfg.enddisc.len));
@@ -538,20 +538,20 @@ command_Expand(char **nargv, int argc, char const *const *oargv,
nargv[arg] = subst(nargv[arg], "INTERFACE", bundle->iface->name);
nargv[arg] = substull(nargv[arg], "IPOCTETSIN",
bundle->ncp.ipcp.throughput.OctetsIn);
- nargv[arg] = substull(nargv[arg], "IPOCTETSOUT",
+ nargv[arg] = substull(nargv[arg], "IPOCTETSOUT",
bundle->ncp.ipcp.throughput.OctetsOut);
- nargv[arg] = substull(nargv[arg], "IPPACKETSIN",
+ nargv[arg] = substull(nargv[arg], "IPPACKETSIN",
bundle->ncp.ipcp.throughput.PacketsIn);
- nargv[arg] = substull(nargv[arg], "IPPACKETSOUT",
+ nargv[arg] = substull(nargv[arg], "IPPACKETSOUT",
bundle->ncp.ipcp.throughput.PacketsOut);
#ifndef NOINET6
- nargv[arg] = substull(nargv[arg], "IPV6OCTETSIN",
+ nargv[arg] = substull(nargv[arg], "IPV6OCTETSIN",
bundle->ncp.ipv6cp.throughput.OctetsIn);
- nargv[arg] = substull(nargv[arg], "IPV6OCTETSOUT",
+ nargv[arg] = substull(nargv[arg], "IPV6OCTETSOUT",
bundle->ncp.ipv6cp.throughput.OctetsOut);
- nargv[arg] = substull(nargv[arg], "IPV6PACKETSIN",
+ nargv[arg] = substull(nargv[arg], "IPV6PACKETSIN",
bundle->ncp.ipv6cp.throughput.PacketsIn);
- nargv[arg] = substull(nargv[arg], "IPV6PACKETSOUT",
+ nargv[arg] = substull(nargv[arg], "IPV6PACKETSOUT",
bundle->ncp.ipv6cp.throughput.PacketsOut);
#endif
nargv[arg] = subst(nargv[arg], "LABEL", bundle_GetLabel(bundle));
@@ -1661,7 +1661,7 @@ SetVariable(struct cmdargs const *arg)
case VAR_AUTOLOAD:
if (arg->argc == arg->argn + 3) {
- int v1, v2, v3;
+ int v1, v2, v3;
char *end;
v1 = strtol(arg->argv[arg->argn], &end, 0);
@@ -2258,7 +2258,7 @@ static struct cmdtab const SetCommands[] = {
"callback control", "set callback [none|auth|cbcp|"
"E.164 *|number[,number]...]...", (const void *)VAR_CALLBACK},
{"cbcp", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX,
- "CBCP control", "set cbcp [*|phone[,phone...] [delay [timeout]]]",
+ "CBCP control", "set cbcp [*|phone[,phone...] [delay [timeout]]]",
(const void *)VAR_CBCP},
{"ccpretry", "ccpretries", SetVariable, LOCAL_AUTH | LOCAL_CX_OPT,
"CCP retries", "set ccpretry value [attempts]", (const void *)VAR_CCPRETRY},
@@ -2277,7 +2277,7 @@ static struct cmdtab const SetCommands[] = {
(const void *) VAR_WINSIZE},
#ifndef NODES
{"mppe", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX_OPT,
- "MPPE key size and state", "set mppe [40|56|128|* [stateful|stateless|*]]",
+ "MPPE key size and state", "set mppe [40|56|128|* [stateful|stateless|*]]",
(const void *) VAR_MPPE},
#endif
{"device", "line", SetVariable, LOCAL_AUTH | LOCAL_CX,
@@ -2989,7 +2989,7 @@ ClearCommand(struct cmdargs const *arg)
clear_type |= THROUGHPUT_PEAK;
else
return -1;
- } else
+ } else
clear_type = THROUGHPUT_ALL;
throughput_clear(t, clear_type, arg->prompt);
diff --git a/usr.sbin/ppp/ppp/datalink.c b/usr.sbin/ppp/ppp/datalink.c
index 0f306400b8a..83ce82e7fe2 100644
--- a/usr.sbin/ppp/ppp/datalink.c
+++ b/usr.sbin/ppp/ppp/datalink.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: datalink.c,v 1.41 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: datalink.c,v 1.42 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -210,14 +210,14 @@ datalink_LoginDone(struct datalink *dl)
{
chat_Finish(&dl->chat);
- if (!dl->script.packetmode) {
+ if (!dl->script.packetmode) {
dl->dial.tries = -1;
dl->dial.incs = 0;
datalink_NewState(dl, DATALINK_READY);
} else if (!physical_Raw(dl->physical)) {
dl->dial.tries = 0;
log_Printf(LogWARN, "datalink_LoginDone: Not connected.\n");
- if (dl->script.run) {
+ if (dl->script.run) {
datalink_NewState(dl, DATALINK_LOGOUT);
if (!chat_Setup(&dl->chat, dl->cfg.script.logout, NULL))
log_Printf(LogWARN, "Invalid logout script\n");
@@ -339,7 +339,7 @@ datalink_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e,
case CARRIER_LOST:
physical_Offline(dl->physical); /* Is this required ? */
- if (dl->script.run) {
+ if (dl->script.run) {
datalink_NewState(dl, DATALINK_HANGUP);
if (!chat_Setup(&dl->chat, dl->cfg.script.hangup, NULL))
log_Printf(LogWARN, "Invalid hangup script\n");
diff --git a/usr.sbin/ppp/ppp/id.c b/usr.sbin/ppp/ppp/id.c
index 0e7aac6f8bc..027399397c3 100644
--- a/usr.sbin/ppp/ppp/id.c
+++ b/usr.sbin/ppp/ppp/id.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: id.c,v 1.9 2002/05/27 23:19:38 brian Exp $
+ * $OpenBSD: id.c,v 1.10 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -228,7 +228,7 @@ ID0logout(const char *device, int nologout)
ID0set0();
if (nologout || logout(ut_line)) {
log_Printf(LogID0, "logout(\"%s\")\n", ut_line);
- logwtmp(ut_line, "", "");
+ logwtmp(ut_line, "", "");
log_Printf(LogID0, "logwtmp(\"%s\", \"\", \"\")\n", ut_line);
} else
log_Printf(LogERROR, "ID0logout: No longer logged in on %s\n", ut_line);
diff --git a/usr.sbin/ppp/ppp/iface.c b/usr.sbin/ppp/ppp/iface.c
index 6140c76ad26..0b3acd31b93 100644
--- a/usr.sbin/ppp/ppp/iface.c
+++ b/usr.sbin/ppp/ppp/iface.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: iface.c,v 1.24 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: iface.c,v 1.25 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -252,7 +252,7 @@ iface_addr_Zap(const char *name, struct iface_addr *addr, int s)
memcpy(&ifra6.ifra_dstaddr, &sspeer, sizeof ifra6.ifra_dstaddr);
ifra6.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;
ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
-
+
res = ID0ioctl(s, SIOCDIFADDR_IN6, &ifra6);
break;
#endif
@@ -386,7 +386,7 @@ iface_Clear(struct iface *iface, struct ncp *ncp, int family, int how)
}
s = &s4;
break;
-
+
#ifndef NOINET6
case AF_INET6:
if (in6skip) {
diff --git a/usr.sbin/ppp/ppp/ip.c b/usr.sbin/ppp/ppp/ip.c
index ce02d7ad390..2293e566939 100644
--- a/usr.sbin/ppp/ppp/ip.c
+++ b/usr.sbin/ppp/ppp/ip.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: ip.c,v 1.35 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: ip.c,v 1.36 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -218,7 +218,7 @@ FilterCheck(const unsigned char *packet, u_int32_t family,
*/
const struct ip *pip = (const struct ip *)packet;
- len = ntohs(pip->ip_off) & IP_OFFMASK; /* fragment offset */
+ len = ntohs(pip->ip_off) & IP_OFFMASK; /* fragment offset */
if (len > 0) { /* Not first fragment within datagram */
if (len < (24 >> 3)) { /* don't allow fragment to over-write header */
log_Printf(LogFILTER, " error: illegal header\n");
@@ -231,7 +231,7 @@ FilterCheck(const unsigned char *packet, u_int32_t family,
} else
return 0;
}
-
+
ncpaddr_setip4(&srcaddr, pip->ip_src);
ncpaddr_setip4(&dstaddr, pip->ip_dst);
datalen = ntohs(pip->ip_len) - (pip->ip_hl << 2);
@@ -432,12 +432,12 @@ FilterCheck(const unsigned char *packet, u_int32_t family,
} else {
if (log_IsKept(LogFILTER)) {
snprintf(dstip, sizeof dstip, "%s", ncpaddr_ntoa(&dstaddr));
- log_Printf(LogFILTER,
- "%sbound rule = %d deny %s src = %s/%d dst = %s/%d\n",
+ log_Printf(LogFILTER,
+ "%sbound rule = %d deny %s src = %s/%d dst = %s/%d\n",
filter->name, n, prototxt,
ncpaddr_ntoa(&srcaddr), sport, dstip, dport);
}
- return 1;
+ return 1;
} /* Explict match. Deny this packet */
}
} else {
@@ -448,8 +448,8 @@ FilterCheck(const unsigned char *packet, u_int32_t family,
if (log_IsKept(LogFILTER)) {
snprintf(dstip, sizeof dstip, "%s", ncpaddr_ntoa(&dstaddr));
- log_Printf(LogFILTER,
- "%sbound rule = implicit deny %s src = %s/%d dst = %s/%d\n",
+ log_Printf(LogFILTER,
+ "%sbound rule = implicit deny %s src = %s/%d dst = %s/%d\n",
filter->name, prototxt, ncpaddr_ntoa(&srcaddr), sport,
dstip, dport);
}
@@ -849,7 +849,7 @@ PacketCheck(struct bundle *bundle, u_int32_t family,
*psecs = alivesecs;
if (*psecs) {
if (*psecs != alivesecs)
- log_Printf(LogTCPIP, "%s - (timeout = %d / ALIVE = %d secs)\n",
+ log_Printf(LogTCPIP, "%s - (timeout = %d / ALIVE = %d secs)\n",
logbuf, *psecs, alivesecs);
else
log_Printf(LogTCPIP, "%s - (timeout = %d secs)\n", logbuf, *psecs);
diff --git a/usr.sbin/ppp/ppp/ipcp.c b/usr.sbin/ppp/ppp/ipcp.c
index ce7e8986fbd..4d34cf12839 100644
--- a/usr.sbin/ppp/ppp/ipcp.c
+++ b/usr.sbin/ppp/ppp/ipcp.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: ipcp.c,v 1.36 2002/06/15 01:33:23 brian Exp $
+ * $OpenBSD: ipcp.c,v 1.37 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -339,7 +339,7 @@ ipcp_RestoreDNS(struct ipcp *ipcp)
} else if (remove(_PATH_RESCONF) == -1)
log_Printf(LogERROR, "Failed removing %s: %s\n", _PATH_RESCONF,
strerror(errno));
-
+
}
int
@@ -938,7 +938,7 @@ IpcpLayerUp(struct fsm *fp)
return 0;
#ifndef NORADIUS
- radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links,
+ radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links,
RAD_START, &ipcp->peer_ip, &ipcp->ifmask, &ipcp->throughput);
if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
diff --git a/usr.sbin/ppp/ppp/lcp.c b/usr.sbin/ppp/ppp/lcp.c
index 7b561663f24..c96d357ba63 100644
--- a/usr.sbin/ppp/ppp/lcp.c
+++ b/usr.sbin/ppp/ppp/lcp.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: lcp.c,v 1.36 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: lcp.c,v 1.37 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -1219,7 +1219,7 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
break;
}
break;
-
+
default:
sz = (sizeof desc - 2) / 2;
if (sz > opt->hdr.len - 2)
diff --git a/usr.sbin/ppp/ppp/log.c b/usr.sbin/ppp/ppp/log.c
index eb07284696c..77fdb76bc72 100644
--- a/usr.sbin/ppp/ppp/log.c
+++ b/usr.sbin/ppp/ppp/log.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: log.c,v 1.15 2001/11/23 11:17:03 brian Exp $
+ * $OpenBSD: log.c,v 1.16 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/types.h>
@@ -323,7 +323,7 @@ log_Printf(int lev, const char *fmt,...)
LogTunno, log_Name(lev), fmt);
else
snprintf(nfmt, sizeof nfmt, "%s: %s", log_Name(lev), fmt);
-
+
if (log_PromptContext && lev == LogWARN)
/* Warnings just go to the current prompt */
prompt_vPrintf(log_PromptContext, nfmt, ap);
diff --git a/usr.sbin/ppp/ppp/log.h b/usr.sbin/ppp/ppp/log.h
index c6089ad41e4..15aeff41f85 100644
--- a/usr.sbin/ppp/ppp/log.h
+++ b/usr.sbin/ppp/ppp/log.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: log.h,v 1.10 2001/11/23 11:17:03 brian Exp $
+ * $OpenBSD: log.h,v 1.11 2002/06/15 08:02:00 brian Exp $
*/
#define LogLOG (0)
@@ -53,7 +53,7 @@
#define LogERROR (23) /* syslog(LOG_ERR, ....), + sent to VarTerm */
#define LogALERT (24) /* syslog(LOG_ALERT, ....) */
-#define LogMAXCONF (21)
+#define LogMAXCONF (21)
#define LogMAX (24)
struct mbuf;
diff --git a/usr.sbin/ppp/ppp/lqr.c b/usr.sbin/ppp/ppp/lqr.c
index 52fac67b48a..6b2e7d305bb 100644
--- a/usr.sbin/ppp/ppp/lqr.c
+++ b/usr.sbin/ppp/ppp/lqr.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: lqr.c,v 1.13 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: lqr.c,v 1.14 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/param.h>
@@ -240,7 +240,7 @@ lqr_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
if (p->hdlc.lqm.timer.load == 0 ||
!(p->hdlc.lqm.method & LQM_LQR) ||
(lastLQR && lastLQR == p->hdlc.lqm.lqr.peer.PeerInLQRs) ||
- (p->hdlc.lqm.lqr.peer_timeout &&
+ (p->hdlc.lqm.lqr.peer_timeout &&
p->hdlc.lqm.timer.rest * 100 / SECTICKS >
p->hdlc.lqm.lqr.peer_timeout))
SendLqrData(lcp);
diff --git a/usr.sbin/ppp/ppp/mbuf.c b/usr.sbin/ppp/ppp/mbuf.c
index f1e7599d6b9..ec2b566fe5b 100644
--- a/usr.sbin/ppp/ppp/mbuf.c
+++ b/usr.sbin/ppp/ppp/mbuf.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: mbuf.c,v 1.15 2001/08/19 23:22:18 brian Exp $
+ * $OpenBSD: mbuf.c,v 1.16 2002/06/15 08:02:00 brian Exp $
*/
#include <sys/types.h>
@@ -86,7 +86,7 @@ m_length(struct mbuf *bp)
static const char *
mbuftype(int type)
{
- static const char * const mbufdesc[MB_MAX] = {
+ static const char * const mbufdesc[MB_MAX] = {
"ip in", "ip out", "ipv6 in", "ipv6 out", "nat in", "nat out",
"mp in", "mp out", "vj in", "vj out", "icompd in", "icompd out",
"compd in", "compd out", "lqr in", "lqr out", "echo in", "echo out",
@@ -110,7 +110,7 @@ m_get(size_t m_len, int type)
log_Printf(LogERROR, "Bad mbuf type %d\n", type);
type = MB_UNKNOWN;
}
-
+
if (m_len > M_MAXLEN || m_len == 0) {
log_Printf(LogERROR, "Request for mbuf size %lu (\"%s\") denied !\n",
(u_long)m_len, mbuftype(type));
@@ -342,7 +342,7 @@ struct mbuf *
m_dequeue(struct mqueue *q)
{
struct mbuf *bp;
-
+
log_Printf(LogDEBUG, "m_dequeue: queue len = %lu\n", (u_long)q->len);
bp = q->top;
if (bp) {
diff --git a/usr.sbin/ppp/ppp/ncpaddr.c b/usr.sbin/ppp/ppp/ncpaddr.c
index a0251ba62a0..5a6fbcd7522 100644
--- a/usr.sbin/ppp/ppp/ncpaddr.c
+++ b/usr.sbin/ppp/ppp/ncpaddr.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: ncpaddr.c,v 1.5 2002/05/16 14:46:05 brian Exp $
+ * $OpenBSD: ncpaddr.c,v 1.6 2002/06/15 08:02:01 brian Exp $
*/
#include <sys/types.h>
@@ -405,7 +405,7 @@ ncpaddr_aton(struct ncpaddr *addr, struct ncp *ncp, const char *data)
if (!ncprange_aton(&range, ncp, data))
return 0;
-
+
if (range.ncprange_family == AF_INET && range.ncprange_ip4width != 32) {
log_Printf(LogWARN, "ncpaddr_aton: %s: Only 32 bits allowed\n", data);
return 0;
diff --git a/usr.sbin/ppp/ppp/netgraph.c b/usr.sbin/ppp/ppp/netgraph.c
index 13c69041ca4..8d253560467 100644
--- a/usr.sbin/ppp/ppp/netgraph.c
+++ b/usr.sbin/ppp/ppp/netgraph.c
@@ -615,7 +615,7 @@ ng_Create(struct physical *p)
break;
}
}
-
+
if (f == ninfo->hooks) {
/* Attempt to load the module */
snprintf(modname, sizeof modname, "ng_%s", nodetype);
diff --git a/usr.sbin/ppp/ppp/physical.c b/usr.sbin/ppp/ppp/physical.c
index 52fda982b71..e5af91676d2 100644
--- a/usr.sbin/ppp/ppp/physical.c
+++ b/usr.sbin/ppp/ppp/physical.c
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $OpenBSD: physical.c,v 1.35 2002/05/27 23:19:38 brian Exp $
+ * $OpenBSD: physical.c,v 1.36 2002/06/15 08:02:01 brian Exp $
*
*/
@@ -479,7 +479,7 @@ physical_ShowStatus(struct cmdargs const *arg)
prompt_Printf(arg->prompt, "\"%s\"", dev);
dev += strlen(dev) + 1;
}
-
+
prompt_Printf(arg->prompt, "\n Characteristics: ");
if (physical_IsSync(arg->cx->physical))
prompt_Printf(arg->prompt, "sync");
diff --git a/usr.sbin/ppp/ppp/prompt.c b/usr.sbin/ppp/ppp/prompt.c
index 9207e0900d5..e10a9e32e66 100644
--- a/usr.sbin/ppp/ppp/prompt.c
+++ b/usr.sbin/ppp/ppp/prompt.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: prompt.c,v 1.12 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: prompt.c,v 1.13 2002/06/15 08:02:01 brian Exp $
*/
#include <sys/param.h>
@@ -277,7 +277,7 @@ prompt_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
arg.bundle = bundle;
arg.cx = p->TermMode;
arg.prompt = p;
-
+
mbuf_Show(&arg);
}
break;
diff --git a/usr.sbin/ppp/ppp/radius.c b/usr.sbin/ppp/ppp/radius.c
index fb5c1b4670b..29dab0c440b 100644
--- a/usr.sbin/ppp/ppp/radius.c
+++ b/usr.sbin/ppp/ppp/radius.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: radius.c,v 1.18 2002/06/15 01:33:23 brian Exp $
+ * $OpenBSD: radius.c,v 1.19 2002/06/15 08:02:01 brian Exp $
*
*/
@@ -448,7 +448,7 @@ radius_Process(struct radius *r, int got)
r->msrepstr);
}
break;
-
+
case RAD_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY:
r->mppe.policy = rad_cvt_int(data);
log_Printf(LogPHASE, " MS-MPPE-Encryption-Policy %s\n",
@@ -820,7 +820,7 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
break;
#endif
default:
- log_Printf(LogERROR, "CHAP: Unrecognised type 0x%02x\n",
+ log_Printf(LogERROR, "CHAP: Unrecognised type 0x%02x\n",
authp->physical->link.lcp.want_authtype);
rad_close(r->cx.rad);
return 0;
@@ -871,7 +871,7 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
* Send an accounting request to the RADIUS server
*/
void
-radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
+radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
int acct_type, struct in_addr *peer_ip, struct in_addr *netmask,
struct pppThroughput *stats)
{
@@ -920,7 +920,7 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
ac->user_name[AUTHLEN-1] = '\0';
ac->authentic = 2; /* Assume RADIUS verified auth data */
-
+
/* Generate a session ID */
snprintf(ac->session_id, sizeof ac->session_id, "%s%ld-%s%lu",
dl->bundle->cfg.auth.name, (long)getpid(),
@@ -938,8 +938,8 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
if (rad_put_string(r->cx.rad, RAD_USER_NAME, ac->user_name) != 0 ||
rad_put_int(r->cx.rad, RAD_SERVICE_TYPE, RAD_FRAMED) != 0 ||
- rad_put_int(r->cx.rad, RAD_FRAMED_PROTOCOL, RAD_PPP) != 0 ||
- rad_put_addr(r->cx.rad, RAD_FRAMED_IP_ADDRESS, ac->ip) != 0 ||
+ rad_put_int(r->cx.rad, RAD_FRAMED_PROTOCOL, RAD_PPP) != 0 ||
+ rad_put_addr(r->cx.rad, RAD_FRAMED_IP_ADDRESS, ac->ip) != 0 ||
rad_put_addr(r->cx.rad, RAD_FRAMED_IP_NETMASK, ac->mask) != 0) {
log_Printf(LogERROR, "rad_put: %s\n", rad_strerror(r->cx.rad));
rad_close(r->cx.rad);
@@ -971,10 +971,10 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
radius_put_physical_details(r->cx.rad, dl->physical);
if (rad_put_int(r->cx.rad, RAD_ACCT_STATUS_TYPE, acct_type) != 0 ||
- rad_put_string(r->cx.rad, RAD_ACCT_SESSION_ID, ac->session_id) != 0 ||
+ rad_put_string(r->cx.rad, RAD_ACCT_SESSION_ID, ac->session_id) != 0 ||
rad_put_string(r->cx.rad, RAD_ACCT_MULTI_SESSION_ID,
ac->multi_session_id) != 0 ||
- rad_put_int(r->cx.rad, RAD_ACCT_DELAY_TIME, 0) != 0) {
+ rad_put_int(r->cx.rad, RAD_ACCT_DELAY_TIME, 0) != 0) {
/* XXX ACCT_DELAY_TIME should be increased each time a packet is waiting */
log_Printf(LogERROR, "rad_put: %s\n", rad_strerror(r->cx.rad));
rad_close(r->cx.rad);
diff --git a/usr.sbin/ppp/ppp/radius.h b/usr.sbin/ppp/ppp/radius.h
index 693ff6ebee2..8fd1390694f 100644
--- a/usr.sbin/ppp/ppp/radius.h
+++ b/usr.sbin/ppp/ppp/radius.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: radius.h,v 1.9 2002/06/15 01:33:23 brian Exp $
+ * $OpenBSD: radius.h,v 1.10 2002/06/15 08:02:01 brian Exp $
*/
#define MPPE_POLICY_ALLOWED 1
@@ -86,7 +86,7 @@ extern void radius_Show(struct radius *, struct prompt *);
extern int radius_Authenticate(struct radius *, struct authinfo *,
const char *, const char *, int,
const char *, int, const char *, int);
-extern void radius_Account(struct radius *, struct radacct *,
+extern void radius_Account(struct radius *, struct radacct *,
struct datalink *, int, struct in_addr *,
struct in_addr *, struct pppThroughput *);
diff --git a/usr.sbin/ppp/ppp/slcompress.c b/usr.sbin/ppp/ppp/slcompress.c
index 97c7ac0f119..3c455870116 100644
--- a/usr.sbin/ppp/ppp/slcompress.c
+++ b/usr.sbin/ppp/ppp/slcompress.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $OpenBSD: slcompress.c,v 1.14 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: slcompress.c,v 1.15 2002/06/15 08:02:01 brian Exp $
*
* Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
* - Initial distribution.
@@ -184,7 +184,7 @@ sl_compress_tcp(struct mbuf * m,
/*
* Wasn't the first -- search for it.
- *
+ *
* States are kept in a circularly linked list with last_cs pointing to the
* end of the list. The list is kept in lru order by moving a state to
* the head of the list whenever it is referenced. Since the list is
diff --git a/usr.sbin/ppp/ppp/tcpmss.c b/usr.sbin/ppp/ppp/tcpmss.c
index 41e484d3f6a..e834e5d27b0 100644
--- a/usr.sbin/ppp/ppp/tcpmss.c
+++ b/usr.sbin/ppp/ppp/tcpmss.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: tcpmss.c,v 1.5 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: tcpmss.c,v 1.6 2002/06/15 08:02:01 brian Exp $
*/
#include <sys/param.h>
@@ -70,7 +70,7 @@
* We are in a liberal position about MSS
* (RFC 879, section 7).
*/
-#define MAXMSS(mtu) (mtu - sizeof(struct ip) - sizeof(struct tcphdr))
+#define MAXMSS(mtu) (mtu - sizeof(struct ip) - sizeof(struct tcphdr))
/*-
diff --git a/usr.sbin/ppp/ppp/throughput.c b/usr.sbin/ppp/ppp/throughput.c
index d35fa1b9bd4..69211883c4c 100644
--- a/usr.sbin/ppp/ppp/throughput.c
+++ b/usr.sbin/ppp/ppp/throughput.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: throughput.c,v 1.10 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: throughput.c,v 1.11 2002/06/15 08:02:01 brian Exp $
*/
#include <sys/types.h>
@@ -85,8 +85,8 @@ throughput_uptime(struct pppThroughput *t)
downat = t->downtime ? t->downtime : time(NULL);
if (t->uptime && downat < t->uptime) {
/* Euch ! The clock's gone back ! */
- int i;
-
+ int i;
+
for (i = 0; i < t->SamplePeriod; i++)
t->in.SampleOctets[i] = t->out.SampleOctets[i] = 0;
t->nSample = 0;
@@ -270,7 +270,7 @@ throughput_clear(struct pppThroughput *t, int clear_type, struct prompt *prompt)
t->OctetsIn = t->OctetsOut = 0;
t->downtime = 0;
time(&t->uptime);
- }
+ }
if (clear_type & THROUGHPUT_CURRENT) {
prompt_Printf(prompt, "current cleared (was %6qu bytes/sec in,"
@@ -287,7 +287,7 @@ throughput_clear(struct pppThroughput *t, int clear_type, struct prompt *prompt)
if (last > time_buf && *--last == '\n')
*last = '\0';
prompt_Printf(prompt, "peak cleared (was %6qu bytes/sec on %s)\n",
- t->BestOctetsPerSecond, time_buf);
+ t->BestOctetsPerSecond, time_buf);
t->BestOctetsPerSecond = 0;
time(&t->BestOctetsPerSecondTime);
}
diff --git a/usr.sbin/ppp/ppp/timer.c b/usr.sbin/ppp/ppp/timer.c
index 657999e9033..874161c381d 100644
--- a/usr.sbin/ppp/ppp/timer.c
+++ b/usr.sbin/ppp/ppp/timer.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: timer.c,v 1.12 2002/06/15 01:33:23 brian Exp $
+ * $OpenBSD: timer.c,v 1.13 2002/06/15 08:02:01 brian Exp $
*/
#include <errno.h>
@@ -211,13 +211,13 @@ TimerService(void)
exp = tp;
tp = next;
} while (tp && tp->rest == 0);
-
+
TimerList = tp;
if (TimerList != NULL) /* Any timers remaining ? */
timer_InitService(1); /* Restart the Timer Service */
else
timer_TermService(); /* Stop the Timer Service */
-
+
/* Process all expired timers */
while (exp) {
ExpiredList = exp->enext;
@@ -262,7 +262,7 @@ timer_Show(int LogLevel, struct prompt *prompt)
log_Printf(LogLevel, "---- End of Timer Service List ---\n");
}
-void
+void
timer_InitService(int restart)
{
struct itimerval itimer;
@@ -279,7 +279,7 @@ timer_InitService(int restart)
}
}
-void
+void
timer_TermService(void)
{
struct itimerval itimer;
diff --git a/usr.sbin/ppp/ppp/tun.c b/usr.sbin/ppp/ppp/tun.c
index 09b209c8e0d..e1c1f45a703 100644
--- a/usr.sbin/ppp/ppp/tun.c
+++ b/usr.sbin/ppp/ppp/tun.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: tun.c,v 1.15 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: tun.c,v 1.16 2002/06/15 08:02:01 brian Exp $
*/
#include <sys/param.h>
@@ -86,9 +86,9 @@ tun_configure(struct bundle *bundle)
#ifdef __NetBSD__
struct ifreq ifr;
int s;
-
+
s = socket(PF_INET, SOCK_DGRAM, 0);
-
+
if (s < 0) {
log_Printf(LogERROR, "tun_configure: socket(): %s\n", strerror(errno));
return;
@@ -107,7 +107,7 @@ tun_configure(struct bundle *bundle)
memset(&info, '\0', sizeof info);
info.type = IFT_PPP;
info.mtu = bundle->iface->mtu;
-
+
info.baudrate = bundle->bandwidth;
#ifdef __OpenBSD__
info.flags = IFF_UP|IFF_POINTOPOINT|IFF_MULTICAST;