Deleted Added
full compact
natd.c (52200) natd.c (56587)
1/*
2 * natd - Network Address Translation Daemon for FreeBSD.
3 *
4 * This software is provided free of charge, with no
5 * warranty of any kind, either expressed or implied.
6 * Use at your own risk.
7 *
8 * You may copy, modify and distribute this software (natd.c) freely.
9 *
10 * Ari Suutari <suutari@iki.fi>
11 *
1/*
2 * natd - Network Address Translation Daemon for FreeBSD.
3 *
4 * This software is provided free of charge, with no
5 * warranty of any kind, either expressed or implied.
6 * Use at your own risk.
7 *
8 * You may copy, modify and distribute this software (natd.c) freely.
9 *
10 * Ari Suutari <suutari@iki.fi>
11 *
12 * $FreeBSD: head/sbin/natd/natd.c 52200 1999-10-13 09:00:16Z ru $
12 * $FreeBSD: head/sbin/natd/natd.c 56587 2000-01-25 12:24:06Z ru $
13 */
14
15#define SYSLOG_NAMES
16
17#include <sys/types.h>
18#include <sys/socket.h>
19#include <sys/sysctl.h>
20#include <sys/time.h>

--- 614 unchanged lines hidden (view full) ---

635
636 if (ifMsg.ifm_version != RTM_VERSION) {
637
638 Warn ("unexpected packet read from routing socket");
639 return;
640 }
641
642 if (verbose)
13 */
14
15#define SYSLOG_NAMES
16
17#include <sys/types.h>
18#include <sys/socket.h>
19#include <sys/sysctl.h>
20#include <sys/time.h>

--- 614 unchanged lines hidden (view full) ---

635
636 if (ifMsg.ifm_version != RTM_VERSION) {
637
638 Warn ("unexpected packet read from routing socket");
639 return;
640 }
641
642 if (verbose)
643 printf ("Routing message %X received.\n", ifMsg.ifm_type);
643 printf ("Routing message %#x received.\n", ifMsg.ifm_type);
644
644
645 if (ifMsg.ifm_type != RTM_NEWADDR)
646 return;
647
648 if (verbose && ifMsg.ifm_index == ifIndex)
649 printf ("Interface address has changed.\n");
650
651 if (ifMsg.ifm_index == ifIndex)
645 if ((ifMsg.ifm_type == RTM_NEWADDR || ifMsg.ifm_type == RTM_IFINFO) &&
646 ifMsg.ifm_index == ifIndex) {
647 if (verbose)
648 printf("Interface address/MTU has probably changed.\n");
652 assignAliasAddr = 1;
649 assignAliasAddr = 1;
650 }
653}
654
655static void PrintPacket (struct ip* ip)
656{
657 printf ("%s", FormatPacket (ip));
658}
659
660static void SyslogPacket (struct ip* ip, int priority, const char *label)

--- 930 unchanged lines hidden ---
651}
652
653static void PrintPacket (struct ip* ip)
654{
655 printf ("%s", FormatPacket (ip));
656}
657
658static void SyslogPacket (struct ip* ip, int priority, const char *label)

--- 930 unchanged lines hidden ---