Skip to content
Browse files

import freebsd54

  • Loading branch information...
1 parent fdd9bc0 commit 89a4a32825d667baa039c6cd7a6261ed2d23930d suz committed
View
4 freebsd5/etc/mtree/BIND.chroot.dist
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BIND.chroot.dist,v 1.5.2.1 2004/09/30 23:36:07 dougb Exp $
+# $FreeBSD: src/etc/mtree/BIND.chroot.dist,v 1.5.2.2 2004/11/11 04:08:16 gshapiro Exp $
#
# Please see the file src/etc/mtree/README before making changes to this file.
#
@@ -9,6 +9,8 @@
..
etc
namedb
+ dynamic uname=bind
+ ..
master
..
slave uname=bind
View
12 freebsd5/etc/mtree/BSD.include.dist
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.88.2.2 2004/09/30 23:36:07 dougb Exp $
+# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.88.2.6 2005/03/07 21:34:50 phk Exp $
#
# Please see the file src/etc/mtree/README before making changes to this file.
#
@@ -30,6 +30,8 @@
crypto
..
dev
+ acpica
+ ..
an
..
bktr
@@ -38,6 +40,8 @@
..
ic
..
+ ieee488
+ ..
iicbus
..
ofw
@@ -94,6 +98,8 @@
..
raid3
..
+ shsec
+ ..
stripe
..
..
@@ -101,6 +107,8 @@
posix
..
..
+ gpib
+ ..
isofs
cd9660
..
@@ -138,6 +146,8 @@
include
..
..
+ netflow
+ ..
..
netinet
..
View
198 freebsd5/etc/mtree/BSD.local.dist
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.112 2004/05/31 07:34:40 kris Exp $
+# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.112.2.2 2005/03/25 06:31:08 krion Exp $
#
# Please see the file src/etc/mtree/README before making changes to this file.
#
@@ -269,53 +269,249 @@
..
..
locale
+ af
+ LC_MESSAGES
+ ..
+ ..
+ am
+ LC_MESSAGES
+ ..
+ ..
+ ar
+ LC_MESSAGES
+ ..
+ ..
+ az
+ LC_MESSAGES
+ ..
+ ..
bg
+ LC_MESSAGES
+ ..
+ ..
+ bn
+ LC_MESSAGES
+ ..
+ ..
+ br
+ LC_MESSAGES
+ ..
+ ..
+ bs
+ LC_MESSAGES
+ ..
+ ..
+ cy
+ LC_MESSAGES
+ ..
..
da
+ LC_MESSAGES
+ ..
..
de
+ LC_MESSAGES
+ ..
+ ..
+ dk
+ LC_MESSAGES
+ ..
+ ..
+ ee
+ LC_MESSAGES
+ ..
..
en
+ LC_MESSAGES
+ ..
+ ..
+ en_CA
+ LC_MESSAGES
+ ..
..
en_GB
+ LC_MESSAGES
+ ..
..
eo
+ LC_MESSAGES
+ ..
..
es
+ LC_MESSAGES
+ ..
+ ..
+ es_ES
+ LC_MESSAGES
+ ..
+ ..
+ es_MX
+ LC_MESSAGES
+ ..
..
et
+ LC_MESSAGES
+ ..
+ ..
+ eu
+ LC_MESSAGES
+ ..
+ ..
+ fa
+ LC_MESSAGES
+ ..
..
fr
+ LC_MESSAGES
+ ..
+ ..
+ ga
+ LC_MESSAGES
+ ..
+ ..
+ gu
+ LC_MESSAGES
+ ..
..
he
+ LC_MESSAGES
+ ..
+ ..
+ hi
+ LC_MESSAGES
+ ..
..
hr
+ LC_MESSAGES
+ ..
..
hu
+ LC_MESSAGES
+ ..
..
id
+ LC_MESSAGES
+ ..
+ ..
+ is
+ LC_MESSAGES
+ ..
..
it
+ LC_MESSAGES
+ ..
..
ja
+ LC_MESSAGES
+ ..
+ ..
+ ka
+ LC_MESSAGES
+ ..
+ ..
+ kn
+ LC_MESSAGES
+ ..
..
lt
+ LC_MESSAGES
+ ..
+ ..
+ lv
+ LC_MESSAGES
+ ..
+ ..
+ mk
+ LC_MESSAGES
+ ..
+ ..
+ ml
+ LC_MESSAGES
+ ..
+ ..
+ mn
+ LC_MESSAGES
+ ..
..
ms
+ LC_MESSAGES
+ ..
+ ..
+ mt
+ LC_MESSAGES
+ ..
..
nb
+ LC_MESSAGES
+ ..
..
nl
+ LC_MESSAGES
+ ..
+ ..
+ or
+ LC_MESSAGES
+ ..
+ ..
+ pa
+ LC_MESSAGES
+ ..
..
pt_BR
+ LC_MESSAGES
+ ..
+ ..
+ pt_PT
+ LC_MESSAGES
+ ..
..
ru
+ LC_MESSAGES
+ ..
+ ..
+ sr@Latn
+ LC_MESSAGES
+ ..
+ ..
+ sq
+ LC_MESSAGES
+ ..
..
sv
+ LC_MESSAGES
+ ..
+ ..
+ ta
+ LC_MESSAGES
+ ..
+ ..
+ th
+ LC_MESSAGES
+ ..
..
tr
+ LC_MESSAGES
+ ..
+ ..
+ vi
+ LC_MESSAGES
+ ..
+ ..
+ wa
+ LC_MESSAGES
+ ..
+ ..
+ zh
+ LC_MESSAGES
+ ..
+ ..
+ zh_CN.GB2312
+ LC_MESSAGES
+ ..
..
zh_TW.Big5
+ LC_MESSAGES
+ ..
..
..
misc
View
2 freebsd5/etc/mtree/BSD.usr.dist
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.304.2.2.2.1 2004/10/23 03:10:48 kensmith Exp $
+# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.304.2.3 2004/10/23 02:58:00 kensmith Exp $
#
# Please see the file src/etc/mtree/README before making changes to this file.
#
View
220 freebsd5/etc/mtree/BSD.x11-4.dist
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.x11-4.dist,v 1.24 2004/05/31 07:34:40 kris Exp $
+# $FreeBSD: src/etc/mtree/BSD.x11-4.dist,v 1.24.2.2 2005/03/25 06:31:08 krion Exp $
#
# Please see the file src/etc/mtree/README before making changes to this file.
#
@@ -458,126 +458,344 @@
..
locale
af
+ LC_MESSAGES
+ ..
..
am
+ LC_MESSAGES
+ ..
+ ..
+ ar
+ LC_MESSAGES
+ ..
..
az
+ LC_MESSAGES
+ ..
..
be
+ LC_MESSAGES
+ ..
..
bg
+ LC_MESSAGES
+ ..
+ ..
+ bn
+ LC_MESSAGES
+ ..
..
bs
+ LC_MESSAGES
+ ..
..
ca
+ LC_MESSAGES
+ ..
..
cs
+ LC_MESSAGES
+ ..
..
cy
+ LC_MESSAGES
+ ..
..
da
+ LC_MESSAGES
+ ..
..
de
+ LC_MESSAGES
+ ..
+ ..
+ de_AT
+ LC_MESSAGES
+ ..
..
el
+ LC_MESSAGES
+ ..
..
en
+ LC_MESSAGES
+ ..
+ ..
+ en_AU
+ LC_MESSAGES
+ ..
..
en_CA
+ LC_MESSAGES
+ ..
..
en_GB
+ LC_MESSAGES
+ ..
..
eo
+ LC_MESSAGES
+ ..
..
es
+ LC_MESSAGES
+ ..
..
es_ES
+ LC_MESSAGES
+ ..
..
es_MX
+ LC_MESSAGES
+ ..
..
et
+ LC_MESSAGES
+ ..
+ ..
+ eu
+ LC_MESSAGES
+ ..
..
fa
+ LC_MESSAGES
+ ..
+ ..
+ fa_IR
+ LC_MESSAGES
+ ..
..
fi
+ LC_MESSAGES
+ ..
..
fr
+ LC_MESSAGES
+ ..
+ ..
+ fr_FR
+ LC_MESSAGES
+ ..
..
ga
+ LC_MESSAGES
+ ..
..
gl
+ LC_MESSAGES
+ ..
+ ..
+ gu
+ LC_MESSAGES
+ ..
..
he
+ LC_MESSAGES
+ ..
+ ..
+ hi
+ LC_MESSAGES
+ ..
..
hr
+ LC_MESSAGES
+ ..
..
hu
+ LC_MESSAGES
+ ..
..
id
+ LC_MESSAGES
+ ..
+ ..
+ is
+ LC_MESSAGES
+ ..
..
it
+ LC_MESSAGES
+ ..
..
ja
+ LC_MESSAGES
+ ..
+ ..
+ ka
+ LC_MESSAGES
+ ..
..
kn
+ LC_MESSAGES
+ ..
..
ko
+ LC_MESSAGES
+ ..
+ ..
+ li
+ LC_MESSAGES
+ ..
..
lt
+ LC_MESSAGES
+ ..
..
lv
+ LC_MESSAGES
+ ..
..
mk
+ LC_MESSAGES
+ ..
..
ml
+ LC_MESSAGES
+ ..
+ ..
+ mn
+ LC_MESSAGES
+ ..
..
ms
+ LC_MESSAGES
+ ..
+ ..
+ mt
+ LC_MESSAGES
+ ..
+ ..
+ nb
+ LC_MESSAGES
+ ..
+ ..
+ ne
+ LC_MESSAGES
+ ..
..
nl
+ LC_MESSAGES
+ ..
..
nn
+ LC_MESSAGES
+ ..
..
no
+ LC_MESSAGES
+ ..
+ ..
+ or
+ LC_MESSAGES
+ ..
+ ..
+ pa
+ LC_MESSAGES
+ ..
..
pl
+ LC_MESSAGES
+ ..
..
pt
+ LC_MESSAGES
+ ..
..
pt_BR
+ LC_MESSAGES
+ ..
..
pt_PT
+ LC_MESSAGES
+ ..
..
ro
+ LC_MESSAGES
+ ..
..
ru
+ LC_MESSAGES
+ ..
..
sk
+ LC_MESSAGES
+ ..
..
sl
+ LC_MESSAGES
+ ..
..
sq
+ LC_MESSAGES
+ ..
..
sr
+ LC_MESSAGES
+ ..
..
sr@Latn
+ LC_MESSAGES
+ ..
..
sv
+ LC_MESSAGES
+ ..
..
ta
+ LC_MESSAGES
+ ..
+ ..
+ tg
+ LC_MESSAGES
+ ..
..
th
+ LC_MESSAGES
+ ..
+ ..
+ tk
+ LC_MESSAGES
+ ..
..
tr
+ LC_MESSAGES
+ ..
..
uk
+ LC_MESSAGES
+ ..
+ ..
+ uz
+ LC_MESSAGES
+ ..
+ ..
+ wa
+ LC_MESSAGES
+ ..
..
vi
+ LC_MESSAGES
+ ..
+ ..
+ zh
+ LC_MESSAGES
+ ..
..
zh_CN
+ LC_MESSAGES
+ ..
+ ..
+ zh_CN.GB2312
+ LC_MESSAGES
+ ..
..
zh_TW
+ LC_MESSAGES
+ ..
..
zh_TW.Big5
+ LC_MESSAGES
+ ..
..
..
..
View
4 freebsd5/etc/mtree/Makefile
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/Makefile,v 1.1.8.1 2004/09/30 23:36:07 dougb Exp $
+# $FreeBSD: src/etc/mtree/Makefile,v 1.1.8.2 2005/02/13 07:23:04 obrien Exp $
FILES= ${_BIND.chroot.dist} \
${_BIND.include.dist} \
@@ -17,7 +17,7 @@ _BIND.include.dist= BIND.include.dist
.endif
.endif
-NOOBJ= noobj
+NOOBJ=
FILESDIR= /etc/mtree
.include <bsd.prog.mk>
View
12 freebsd5/sbin/ifconfig/Makefile
@@ -1,5 +1,5 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/5/93
-# $FreeBSD: src/sbin/ifconfig/Makefile,v 1.25 2004/02/23 20:13:52 johan Exp $
+# $FreeBSD: src/sbin/ifconfig/Makefile,v 1.25.2.1 2005/03/21 16:05:33 glebius Exp $
PROG= ifconfig
SRCS= ifconfig.c
@@ -17,10 +17,20 @@ CFLAGS+=-DUSE_VLANS
SRCS+= ifieee80211.c
CFLAGS+=-DUSE_IEEE80211
+#comment out to exclude SIOC[GS]VH support
+SRCS+= ifcarp.c
+CFLAGS+=-DUSE_CARP
+
#comment out to exclude MAC support
SRCS+= ifmac.c
CFLAGS+=-DUSE_MAC
+#comment out to exclude PFSYNC support
+.if !defined(NO_PF)
+SRCS+= ifpfsync.c
+CFLAGS+=-DUSE_PFSYNC
+.endif
+
MAN= ifconfig.8
.if defined(RELEASE_CRUNCH)
View
169 freebsd5/sbin/ifconfig/ifcarp.c
@@ -0,0 +1,169 @@
+/* $FreeBSD: src/sbin/ifconfig/ifcarp.c,v 1.2.2.1 2005/03/21 16:05:33 glebius Exp $ */
+/* from $OpenBSD: ifconfig.c,v 1.82 2003/10/19 05:43:35 mcbride Exp $ */
+
+/*
+ * Copyright (c) 2002 Michael Shalayeff. All rights reserved.
+ * Copyright (c) 2003 Ryan McBride. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT 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.
+ */
+
+#include <sys/param.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/sockio.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <net/ethernet.h>
+#include <net/if.h>
+#include <netinet/ip_carp.h>
+#include <net/route.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <err.h>
+#include <errno.h>
+
+#include "ifconfig.h"
+
+static const char *carp_states[] = { CARP_STATES };
+
+void
+carp_status(int s, struct rt_addrinfo *info __unused)
+{
+ const char *state;
+ struct carpreq carpr;
+
+ memset((char *)&carpr, 0, sizeof(struct carpreq));
+ ifr.ifr_data = (caddr_t)&carpr;
+
+ if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
+ return;
+
+ if (carpr.carpr_vhid > 0) {
+ if (carpr.carpr_state > CARP_MAXSTATE)
+ state = "<UNKNOWN>";
+ else
+ state = carp_states[carpr.carpr_state];
+
+ printf("\tcarp: %s vhid %d advbase %d advskew %d\n",
+ state, carpr.carpr_vhid, carpr.carpr_advbase,
+ carpr.carpr_advskew);
+ }
+
+ return;
+
+}
+
+void
+setcarp_passwd(const char *val, int d, int s, const struct afswtch *afp)
+{
+ struct carpreq carpr;
+
+ memset((char *)&carpr, 0, sizeof(struct carpreq));
+ ifr.ifr_data = (caddr_t)&carpr;
+
+ if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCGVH");
+
+ /* XXX Should hash the password into the key here, perhaps? */
+ strlcpy(carpr.carpr_key, val, CARP_KEY_LEN);
+
+ if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCSVH");
+
+ return;
+}
+
+void
+setcarp_vhid(const char *val, int d, int s, const struct afswtch *afp)
+{
+ int vhid;
+ struct carpreq carpr;
+
+ vhid = atoi(val);
+
+ if (vhid <= 0)
+ errx(1, "vhid must be greater than 0");
+
+ memset((char *)&carpr, 0, sizeof(struct carpreq));
+ ifr.ifr_data = (caddr_t)&carpr;
+
+ if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCGVH");
+
+ carpr.carpr_vhid = vhid;
+
+ if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCSVH");
+
+ return;
+}
+
+void
+setcarp_advskew(const char *val, int d, int s, const struct afswtch *afp)
+{
+ int advskew;
+ struct carpreq carpr;
+
+ advskew = atoi(val);
+
+ memset((char *)&carpr, 0, sizeof(struct carpreq));
+ ifr.ifr_data = (caddr_t)&carpr;
+
+ if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCGVH");
+
+ carpr.carpr_advskew = advskew;
+
+ if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCSVH");
+
+ return;
+}
+
+void
+setcarp_advbase(const char *val, int d, int s, const struct afswtch *afp)
+{
+ int advbase;
+ struct carpreq carpr;
+
+ advbase = atoi(val);
+
+ memset((char *)&carpr, 0, sizeof(struct carpreq));
+ ifr.ifr_data = (caddr_t)&carpr;
+
+ if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCGVH");
+
+ carpr.carpr_advbase = advbase;
+
+ if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
+ err(1, "SIOCSVH");
+
+ return;
+}
View
8 freebsd5/sbin/ifconfig/ifconfig.8
@@ -26,7 +26,7 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
-.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.85 2004/07/27 09:51:49 yar Exp $
+.\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.85.2.2 2005/03/22 12:36:28 brueffer Exp $
.\"
.Dd July 26, 2004
.Dt IFCONFIG 8
@@ -328,7 +328,7 @@ Some drivers may not be able to enable these flags independently
of each other, so setting one may also set the other.
The driver will offload as much checksum work as it can reliably
support, the exact level of offloading varies between drivers.
-.It Fl rxcsum , Fl txcsum
+.It Fl rxcsum , txcsum
If the driver supports user-configurable checksum offloading,
disable receive (or transmit) checksum offloading on the interface.
These settings may not always be independent of each other.
@@ -459,7 +459,7 @@ Note that this must be issued on a physical interface associated with
not on a
.Xr vlan 4
interface itself.
-.It Fl vlanmtu , Fl vlanhwtag
+.It Fl vlanmtu , vlanhwtag
If the driver offers user-configurable VLAN support, disable
reception of extended frames or tag processing in hardware,
respectively.
@@ -851,7 +851,9 @@ the kernel may act very oddly.
Do this at your own risk.
.Sh SEE ALSO
.Xr netstat 1 ,
+.Xr carp 4 ,
.Xr netintro 4 ,
+.Xr polling 4 ,
.Xr vlan 4 ,
.\" .Xr eon 5 ,
.Xr rc 8 ,
View
27 freebsd5/sbin/ifconfig/ifconfig.c
@@ -38,7 +38,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.106.2.1 2004/09/07 23:21:10 brooks Exp $";
+ "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.106.2.2 2005/03/21 16:05:33 glebius Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -245,6 +245,11 @@ struct cmd {
{ "mediaopt", NEXTARG, setmediaopt },
{ "-mediaopt", NEXTARG, unsetmediaopt },
#endif
+#ifdef USE_PFSYNC
+ { "syncif", NEXTARG, setpfsync_syncif },
+ { "maxupd", NEXTARG, setpfsync_maxupd },
+ { "-syncif", 1, unsetpfsync_syncif },
+#endif
#ifdef USE_VLANS
{ "vlan", NEXTARG, setvlantag },
{ "vlandev", NEXTARG, setvlandev },
@@ -282,6 +287,12 @@ struct cmd {
#ifdef USE_MAC
{ "maclabel", NEXTARG, setifmaclabel },
#endif
+#ifdef USE_CARP
+ { "advbase", NEXTARG, setcarp_advbase },
+ { "advskew", NEXTARG, setcarp_advskew },
+ { "pass", NEXTARG, setcarp_passwd },
+ { "vhid", NEXTARG, setcarp_vhid },
+#endif
{ "rxcsum", IFCAP_RXCSUM, setifcap },
{ "-rxcsum", -IFCAP_RXCSUM, setifcap },
{ "txcsum", IFCAP_TXCSUM, setifcap },
@@ -368,6 +379,9 @@ struct afswtch {
#ifdef USE_IEEE80211
{ "ieee80211", AF_UNSPEC, ieee80211_status, NULL, NULL, }, /* XXX not real!! */
#endif
+#ifdef USE_CARP
+ { "carp", AF_UNSPEC, carp_status, NULL, NULL, }, /* XXX not real!! */
+#endif
#ifdef USE_MAC
{ "maclabel", AF_UNSPEC, maclabel_status, NULL, NULL, },
#endif
@@ -1168,6 +1182,10 @@ status(const struct afswtch *afp, int addrcount, struct sockaddr_dl *sdl,
if (allfamilies || afp->af_status == media_status)
media_status(s, NULL);
#endif
+#ifdef USE_PFSYNC
+ if (allfamilies || afp->af_status == pfsync_status)
+ pfsync_status(s, NULL);
+#endif
#ifdef USE_VLANS
if (allfamilies || afp->af_status == vlan_status)
vlan_status(s, NULL);
@@ -1176,6 +1194,10 @@ status(const struct afswtch *afp, int addrcount, struct sockaddr_dl *sdl,
if (allfamilies || afp->af_status == ieee80211_status)
ieee80211_status(s, NULL);
#endif
+#ifdef USE_CARP
+ if (allfamilies || afp->af_status == carp_status)
+ carp_status(s, NULL);
+#endif
#ifdef USE_MAC
if (allfamilies || afp->af_status == maclabel_status)
maclabel_status(s, NULL);
@@ -1192,6 +1214,9 @@ status(const struct afswtch *afp, int addrcount, struct sockaddr_dl *sdl,
#ifdef USE_VLANS
&& afp->af_status != vlan_status
#endif
+#ifdef USE_CARP
+ && afp->af_status != carp_status
+#endif
)
warnx("%s has no %s interface address!", name, afp->af_name);
View
13 freebsd5/sbin/ifconfig/ifconfig.h
@@ -31,7 +31,7 @@
*
* so there!
*
- * $FreeBSD: src/sbin/ifconfig/ifconfig.h,v 1.12 2004/03/30 22:59:22 sam Exp $
+ * $FreeBSD: src/sbin/ifconfig/ifconfig.h,v 1.12.2.1 2005/03/21 16:05:33 glebius Exp $
*/
extern struct ifreq ifr;
@@ -70,3 +70,14 @@ extern void set80211txpower(const char *, int, int, const struct afswtch *rafp);
extern void ieee80211_status(int s, struct rt_addrinfo *);
extern void maclabel_status(int s, struct rt_addrinfo *);
extern void setifmaclabel(const char *, int, int, const struct afswtch *rafp);
+
+extern void setpfsync_syncif(const char *, int, int, const struct afswtch *rafp);
+extern void unsetpfsync_syncif(const char *, int, int, const struct afswtch *rafp);
+extern void setpfsync_maxupd(const char *, int, int, const struct afswtch *rafp);
+extern void pfsync_status(int, struct rt_addrinfo *);
+
+extern void carp_status(int s, struct rt_addrinfo *);
+extern void setcarp_advbase(const char *,int, int, const struct afswtch *rafp);
+extern void setcarp_advskew(const char *, int, int, const struct afswtch *rafp);
+extern void setcarp_passwd(const char *, int, int, const struct afswtch *rafp);
+extern void setcarp_vhid(const char *, int, int, const struct afswtch *rafp);
View
116 freebsd5/sbin/ifconfig/ifpfsync.c
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2003 Ryan McBride. All rights reserved.
+ * Copyright (c) 2004 Max Laier. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * 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.
+ *
+ * $FreeBSD: src/sbin/ifconfig/ifpfsync.c,v 1.2.2.1 2005/03/21 16:05:33 glebius Exp $
+ */
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+
+#include <net/if.h>
+#include <netinet/in.h>
+#include <net/pfvar.h>
+#include <net/if_pfsync.h>
+#include <net/route.h>
+
+#include <err.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "ifconfig.h"
+
+void
+setpfsync_syncif(const char *val, int d, int s, const struct afswtch *rafp)
+{
+ struct pfsyncreq preq;
+
+ bzero((char *)&preq, sizeof(struct pfsyncreq));
+ ifr.ifr_data = (caddr_t)&preq;
+
+ if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1)
+ err(1, "SIOCGETPFSYNC");
+
+ strlcpy(preq.pfsyncr_syncif, val, sizeof(preq.pfsyncr_syncif));
+
+ if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1)
+ err(1, "SIOCSETPFSYNC");
+}
+
+void
+unsetpfsync_syncif(const char *val, int d, int s, const struct afswtch *rafp)
+{
+ struct pfsyncreq preq;
+
+ bzero((char *)&preq, sizeof(struct pfsyncreq));
+ ifr.ifr_data = (caddr_t)&preq;
+
+ if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1)
+ err(1, "SIOCGETPFSYNC");
+
+ bzero((char *)&preq.pfsyncr_syncif, sizeof(preq.pfsyncr_syncif));
+
+ if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1)
+ err(1, "SIOCSETPFSYNC");
+}
+
+void
+setpfsync_maxupd(const char *val, int d, int s, const struct afswtch *rafp)
+{
+ int maxupdates;
+ struct pfsyncreq preq;
+
+ maxupdates = atoi(val);
+
+ memset((char *)&preq, 0, sizeof(struct pfsyncreq));
+ ifr.ifr_data = (caddr_t)&preq;
+
+ if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1)
+ err(1, "SIOCGETPFSYNC");
+
+ preq.pfsyncr_maxupdates = maxupdates;
+
+ if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1)
+ err(1, "SIOCSETPFSYNC");
+}
+
+void
+pfsync_status(int s, struct rt_addrinfo *info __unused)
+{
+ struct pfsyncreq preq;
+
+ bzero((char *)&preq, sizeof(struct pfsyncreq));
+ ifr.ifr_data = (caddr_t)&preq;
+
+ if (ioctl(s, SIOCGETPFSYNC, (caddr_t)&ifr) == -1)
+ return;
+
+ if (preq.pfsyncr_syncif[0] != '\0') {
+ printf("\tpfsync: syncif: %s maxupd: %d\n",
+ preq.pfsyncr_syncif, preq.pfsyncr_maxupdates);
+ }
+}
View
14 freebsd5/sbin/route/route.8
@@ -26,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)route.8 8.3 (Berkeley) 3/19/94
-.\" $FreeBSD: src/sbin/route/route.8,v 1.38 2004/07/02 21:45:05 ru Exp $
+.\" $FreeBSD: src/sbin/route/route.8,v 1.38.2.2 2005/02/12 15:23:54 brueffer Exp $
.\"
-.Dd November 10, 2003
+.Dd November 4, 2004
.Dt ROUTE 8
.Os
.Sh NAME
@@ -412,3 +412,13 @@ utility appeared in
The first paragraph may have slightly exaggerated
.Xr routed 8 Ns 's
abilities.
+.Pp
+Currently, routes with the
+.Dv RTF_BLACKHOLE
+flag set need to have the gateway set to an instance of the
+.Xr lo 4
+driver, using the
+.Fl iface
+option, for the flag to have any effect; unless IP fast forwarding
+is enabled, in which case the meaning of the flag will always
+be honored.
View
4 freebsd5/usr.bin/netstat/Makefile
@@ -1,5 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/12/93
-# $FreeBSD: src/usr.bin/netstat/Makefile,v 1.23 2004/03/25 09:07:26 bms Exp $
+# $FreeBSD: src/usr.bin/netstat/Makefile,v 1.23.2.1 2005/02/13 07:23:39 obrien Exp $
PROG= netstat
SRCS= if.c inet.c inet6.c main.c mbuf.c mcast.c mroute.c ipx.c route.c \
@@ -7,7 +7,7 @@ SRCS= if.c inet.c inet6.c main.c mbuf.c mcast.c mroute.c ipx.c route.c \
CFLAGS+=-DIPSEC
CFLAGS+=-DINET6
WARNS?= 2
-NO_WERROR?=
+NO_WERROR=
BINGRP= kmem
BINMODE=2555
View
47 freebsd5/usr.bin/netstat/inet.c
@@ -38,7 +38,7 @@ static char sccsid[] = "@(#)inet.c 8.5 (Berkeley) 5/24/95";
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/netstat/inet.c,v 1.67 2004/07/26 20:18:11 charnier Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/netstat/inet.c,v 1.67.2.1 2005/03/21 16:05:36 glebius Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD: src/usr.bin/netstat/inet.c,v 1.67 2004/07/26 20:18:11 charni
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
+#include <netinet/ip_carp.h>
#ifdef INET6
#include <netinet/ip6.h>
#endif /* INET6 */
@@ -525,6 +526,50 @@ udp_stats(u_long off __unused, const char *name, int af1 __unused)
#undef p1a
}
+/*
+ * Dump CARP statistics structure.
+ */
+void
+carp_stats(u_long off, const char *name, int af1 __unused)
+{
+ struct carpstats carpstat, zerostat;
+ size_t len = sizeof(struct carpstats);
+
+ if (zflag)
+ memset(&zerostat, 0, len);
+ if (sysctlbyname("net.inet.carp.stats", &carpstat, &len,
+ zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
+ warn("sysctl: net.inet.carp.stats");
+ return;
+ }
+
+ printf("%s:\n", name);
+
+#define p(f, m) if (carpstat.f || sflag <= 1) \
+ printf(m, (unsigned long long)carpstat.f, plural((int)carpstat.f))
+#define p2(f, m) if (carpstat.f || sflag <= 1) \
+ printf(m, (unsigned long long)carpstat.f)
+
+ p(carps_ipackets, "\t%llu packet%s received (IPv4)\n");
+ p(carps_ipackets6, "\t%llu packet%s received (IPv6)\n");
+ p(carps_badttl, "\t\t%llu packet%s discarded for wrong TTL\n");
+ p(carps_hdrops, "\t\t%llu packet%s shorter than header\n");
+ p(carps_badsum, "\t\t%llu discarded for bad checksum%s\n");
+ p(carps_badver, "\t\t%llu discarded packet%s with a bad version\n");
+ p2(carps_badlen, "\t\t%llu discarded because packet too short\n");
+ p2(carps_badauth, "\t\t%llu discarded for bad authentication\n");
+ p2(carps_badvhid, "\t\t%llu discarded for bad vhid\n");
+ p2(carps_badaddrs, "\t\t%llu discarded because of a bad address list\n");
+ p(carps_opackets, "\t%llu packet%s sent (IPv4)\n");
+ p(carps_opackets6, "\t%llu packet%s sent (IPv6)\n");
+ p2(carps_onomem, "\t\t%llu send failed due to mbuf memory error\n");
+#if notyet
+ p(carps_ostates, "\t\t%s state update%s sent\n");
+#endif
+#undef p
+#undef p2
+}
+
/*
* Dump IP statistics structure.
*/
View
36 freebsd5/usr.bin/netstat/ipx.c
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2004, Robert N. M. Watson
* Copyright (c) 1983, 1988, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -38,7 +39,7 @@ static char sccsid[] = "@(#)ns.c 8.1 (Berkeley) 6/6/93";
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/netstat/ipx.c,v 1.20 2004/07/26 20:18:11 charnier Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/netstat/ipx.c,v 1.20.2.1 2005/02/25 13:13:11 rwatson Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -68,13 +69,8 @@ __FBSDID("$FreeBSD: src/usr.bin/netstat/ipx.c,v 1.20 2004/07/26 20:18:11 charnie
#include <string.h>
#include "netstat.h"
-struct ipxpcb ipxpcb;
-struct spxpcb spxpcb;
-struct socket sockb;
-
static char *ipx_prpr (struct ipx_addr *);
-static int first = 1;
extern char *tcpstates[];
/*
@@ -87,27 +83,26 @@ extern char *tcpstates[];
void
ipxprotopr(u_long off, const char *name, int af1 __unused)
{
- struct ipxpcb cb;
- struct ipxpcb *prev, *next;
+ struct ipxpcbhead cb;
+ struct ipxpcb *ipxp;
+ struct ipxpcb ipxpcb;
+ struct spxpcb spxpcb;
+ struct socket sockb;
+ static int first = 1;
int isspx;
if (off == 0)
return;
+
isspx = strcmp(name, "spx") == 0;
- kread(off, (char *)&cb, sizeof (struct ipxpcb));
- ipxpcb = cb;
- prev = (struct ipxpcb *)off;
- if (ipxpcb.ipxp_next == (struct ipxpcb *)off)
- return;
- for (;ipxpcb.ipxp_next != (struct ipxpcb *)off; prev = next) {
+ kread(off, (char *)&cb, sizeof (struct ipxpcbhead));
+ ipxp = LIST_FIRST(&cb);
+ while (ipxp != NULL) {
u_long ppcb;
- next = ipxpcb.ipxp_next;
- kread((u_long)next, (char *)&ipxpcb, sizeof (ipxpcb));
- if (ipxpcb.ipxp_prev != prev) {
- printf("???\n");
- break;
- }
+ kread((u_long)ipxp, (char *)&ipxpcb, sizeof (ipxpcb));
+ ipxp = LIST_NEXT(&ipxpcb, ipxp_list);
+
if (!aflag && ipx_nullhost(ipxpcb.ipxp_faddr) ) {
continue;
}
@@ -147,7 +142,6 @@ ipxprotopr(u_long off, const char *name, int af1 __unused)
printf(" %s", tcpstates[spxpcb.s_state]);
}
putchar('\n');
- prev = next;
}
}
View
6 freebsd5/usr.bin/netstat/main.c
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94";
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/netstat/main.c,v 1.69 2004/07/26 20:18:11 charnier Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/netstat/main.c,v 1.69.2.1 2005/03/21 16:05:36 glebius Exp $");
#include <sys/param.h>
#include <sys/file.h>
@@ -136,6 +136,8 @@ static struct nlist nl[] = {
{ "_mbuf_lowm" },
#define N_CLLO 32
{ "_clust_lowm" },
+#define N_CARPSTAT 33
+ { "_carpstats" },
{ "" },
};
@@ -171,6 +173,8 @@ struct protox {
bdg_stats, NULL, "bdg", 1 /* bridging... */ },
{ -1, -1, 1, protopr,
pim_stats, NULL, "pim", IPPROTO_PIM },
+ { -1, N_CARPSTAT, 1, 0,
+ carp_stats, NULL, "carp", 0},
{ -1, -1, 0, NULL,
NULL, NULL, NULL, 0 }
};
View
3 freebsd5/usr.bin/netstat/netstat.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)netstat.h 8.2 (Berkeley) 1/4/94
- * $FreeBSD: src/usr.bin/netstat/netstat.h,v 1.40 2004/05/31 21:46:06 bmilekic Exp $
+ * $FreeBSD: src/usr.bin/netstat/netstat.h,v 1.40.2.1 2005/03/21 16:05:36 glebius Exp $
*/
#include <sys/cdefs.h>
@@ -71,6 +71,7 @@ void ip_stats(u_long, const char *, int);
void icmp_stats(u_long, const char *, int);
void igmp_stats(u_long, const char *, int);
void pim_stats(u_long, const char *, int);
+void carp_stats (u_long, const char *, int);
#ifdef IPSEC
void ipsec_stats(u_long, const char *, int);
#endif

0 comments on commit 89a4a32

Please sign in to comment.
Something went wrong with that request. Please try again.