Commit Graph

34 Commits

Author SHA1 Message Date
Bruce M Simpson
3c0f8ff528 Add printb.c utility file, but do not yet connect it to the build. 2009-03-04 02:12:29 +00:00
Bruce M Simpson
3f3d246f2c nits 2009-02-15 15:26:42 +00:00
Bruce M Simpson
6ee0c852ea Blow away KAME MLDv2 hooks.
This code can be gotten from change history here and it's
more than likely our implementation will differ significantly
because of VIMAGE and SMPng.
2009-02-15 15:21:34 +00:00
Bruce M Simpson
d508ff40b9 Improve ifmcstat(8) and fix a few bugs while we're at it:
* Retire the old 'ifmcstat <kernel>' usage.
 * Print AF_LINK records even if run against KVM.
   This makes the KVM backend consistent with the sysctl backend.
 * Suppress printing of link-layer group records by default.
 * Add a -v switch to allow link-layer groups to be printed.
 * If compiled without INET6 support, actually work.
 * If compiled with INET6 support, print the scope ID of
   all IPv6 addresses in both backends.
 * Update man page.
 * Update copyrights.

With this change, it is now reasonable to retire netstat -g.
Most of the SSM related gunk in this file will require later refactoring.

MFC after:	2 weeks
2009-02-15 15:19:34 +00:00
Bruce M Simpson
15c834931c Fix a typo which caused ifmcstat's sysctl path
to print the network-layer endpoint address of the
group membership, rather than its link-layer mapping
as intended.
The KVM path is not affected.

MFC after:	1 week
2009-02-15 12:10:05 +00:00
Giorgos Keramidas
5dde2b655c mdoc fix: Add missing .El request
MFC after:	3 days
2007-10-30 16:04:23 +00:00
Stephane E. Potvin
04031e9ae2 Options spring cleanup:
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed

Approved by: kan (mentor)
Reviewed by: ru
2007-06-13 02:08:04 +00:00
Bruce M Simpson
60dd8da775 Considerably rework the ifmcstat utility.
* Build with or without INET, INET6, or KVM features.
  * When built without KVM, the sysctl-based getifmaddrs() function
    is used as the back-end for the utility.
 * Reflect the fact that FreeBSD now uses the in_multi refcount as
   a true refcount.
 * Style.

The utility may now be run without super-user privilege, albeit with
a less detailed display, equivalent to that of the soon-to-be-retired
netstat -g host-mode output.

MFC after:	3 weeks
2007-04-10 00:26:12 +00:00
Bruce M Simpson
ba640a6ca4 Remove __P. 2007-04-09 19:52:44 +00:00
Bruce M Simpson
aa727a5535 Use -M and -N for core and kernel image respectively. 2007-03-20 02:08:28 +00:00
Bruce M Simpson
cb48db9cf8 Make clean for !INET6.
Remove non-FreeBSD code.
Sort includes.
2007-03-19 18:13:02 +00:00
Bruce M Simpson
1048e6755f Merge latest ifmcstat (with changes for FreeBSD).
Possibly merge or split with netstat -g.

TODO: Make !defined(INET6) clean.
TODO: Add -M/-N instead of -k.
TODO: Use sysctls instead of kvm.

Obtained from:	KAME
MFC after:	2 weeks
2007-03-19 16:45:06 +00:00
Ruslan Ermilov
6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
Dima Dorfman
3ee6bbffb0 Remove unused variable and clamp down with WARNS=2
PR:		71662
Submitted by:	Dan Lukes <dan@obluda.cz>
Tested on:	i386, sparc64, ia64, amd64
2004-09-13 08:14:55 +00:00
Stefan Farfeleder
11012a9973 Include <net/ethernet.h> to have a prototype for ether_ntoa().
Approved by:	das (mentor)
2004-05-28 17:44:11 +00:00
Brooks Davis
9bf40ede4a Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.

This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.

Approved By:	re (in principle)
Reviewed By:	njl, imp
Tested On:	i386, amd64, sparc64
Obtained From:	NetBSD (if_xname)
2003-10-31 18:32:15 +00:00
Hajimu UMEMOTO
d24cb2490d stop use of NI_WITHSCOPEID. it was deprecated.
Obtained from:	KAME
2003-10-21 20:11:47 +00:00
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Ruslan Ermilov
d79bee64d0 Install it with mode 550, and with default group ${BINGRP}. 2001-07-04 07:20:11 +00:00
Ruslan Ermilov
1a484a795d - Document that this program is available to root only.
- Document alternate way to fetch multicast info.
- Add RFC2080 reference.

Obtained from:	OpenBSD (with mods)
2001-07-04 07:17:24 +00:00
Hajimu UMEMOTO
4b68082379 drop setgid bit. ifmcstat(8) is not audited, and is needed only for root.
Obtained from:	KAME
MFC after:	1 week
2001-07-03 18:15:07 +00:00
Dima Dorfman
7309915e7a Nuke unused variables. 2001-06-24 23:41:57 +00:00
Hajimu UMEMOTO
3384154590 Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Poul-Henning Kamp
6817526d14 Convert if_multiaddrs from LIST to TAILQ so that it can be traversed
backwards in the three drivers which want to do that.

Reviewed by:    mikeh
2001-02-06 10:12:15 +00:00
Poul-Henning Kamp
2673ed4725 Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	/sbin/md5
2000-12-30 20:56:04 +00:00
Hajimu UMEMOTO
9bdd4811f4 Sync with latest KAME.
Obtained from:	KAME
2000-07-07 19:19:25 +00:00
Alexey Zelkin
29f225a7c8 Remove useless .Nm macro argument 2000-04-20 15:21:16 +00:00
Yoshinobu Inoue
04e8772051 remove redundant ifdef's.
some part is specified by: phantom
2000-01-07 10:02:43 +00:00
Bill Fumerola
467a57a7c4 Fix KERNEL vs _KERNEL spammage.
Submitted by:	Paul Saab <paul@mu.org>
1999-12-30 04:12:36 +00:00
Yoshinobu Inoue
7d56d3747c Getaddrinfo(), getnameinfo(), and etc support in libc/net.
Several udp and raw apps IPv6 support.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-28 02:37:14 +00:00