summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/sctp.c
Commit message (Collapse)AuthorAgeFilesLines
* WARNS=6 compliancecharnier2013-02-191-3/+3
|
* Allow netstat to be build if INET is not defined in the kernel.tuexen2012-07-161-0/+4
| | | | | | | Thanks to Garrett Cooper for reporting the issue. MFC after: 3 days X-MFC: 238501
* Don't print a warning when using netstat to printtuexen2012-01-251-1/+2
| | | | | | | SCTP statistics when there is not SCTP in the kernel. This problem was reported by Sean Mahood. MFC after: 1 week.
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-031-3/+3
| | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
* Fix the following bugs related to the SCTP support of netstat:tuexen2011-07-221-113/+204
| | | | | | | | | | | | * Correctly handle -a. * -A isn't supported. * Show all closed 1-to-1 and 1-to-many style sockets. * Show all listening 1-to-many style sockets. * Use consistent formatting for -W. PR: 150642 Approved by: re@ MFC after: 4 weeks.
* Fix typo.brucec2011-03-131-1/+1
|
* Remove superfluous cast in usr.bin/netstat/sctp.c.dim2010-10-081-1/+1
| | | | | | Found by: clang Submitted by: Norberto Lopes, nlopes dot ml at gmail dot com Approved by: rpaulo (mentor)
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+3
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-3/+0
| | | | Tested with: make universe
* Fixes typo's in sctp.crrs2008-04-161-4/+4
|
* style(9)obrien2008-01-021-37/+36
| | | | | | | + kread is not a boolean, so check it as such + fix $FreeBSD$ Ids + denote copyrights with /*- + misc whitespace changes.
* Fix incorrect string formats for netstat/srrs2007-10-171-48/+48
| | | | | | PR: 117175 Obtained from: Weongyo Jeong (weongyo.jeong@gmail.com) MFC after: 1 week
* - Netstat warning removal for 64 bit aware platforms.rrs2007-09-091-117/+108
| | | | Approved by: re@freebsd.org (B Mah)
* - Fix typo in netstat's display of Nagle algorithm - refer to the RFC.rrs2007-08-241-2/+2
| | | | | Submitted by: bruce@cran.org.uk Approved by: re@freebsd.org (Bruce Mah)
* Restore netstat -M functionality for most statistics on core dumps. Injhb2007-07-161-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | general, when support was added to netstat for fetching data using sysctl, no provision was left for fetching equivalent data from a core dump, and in fact, netstat would _always_ fetch data from the live kernel using sysctl even when -M was specified resulting in the user believing they were getting data from coredumps when they actually weren't. Some specific changes: - Add a global 'live' variable that is true if netstat is running against the live kernel and false if -M has been specified. - Stop abusing the sysctl flag in the protocol tables to hold the protocol number. Instead, the protocol is now its own field in the tables, and it is passed as a separate parameter to the PCB and stat routines rather than overloading the KVM offset parameter. - Don't run PCB or stats functions who don't have a namelist offset if we are being run against a crash dump (!live). - For the inet and unix PCB routines, we generate the same buffer from KVM that the sysctl usually generates complete with the header and trailer. - Don't run bpf stats for !live (before it would just silently always run live). - kread() no longer trashes memory when opening the buffer if there is an error on open and the passed in buffer is smaller than _POSIX2_LINE_MAX. - The multicast routing code doesn't fallback to kvm on live kernels if the sysctl fails. Keeping this made the code rather hairy, and netstat is already tied to the kernel ABI anyway (even when using sysctl's since things like xinpcb contain an inpcb) so any kernels this is run against that have the multicast routing stuff should have the sysctls. - Don't try to dig around in the kernel linker in the netgraph PCB routine for core dumps. Other notes: - sctp's PCB routine only works on live kernels, it looked rather complicated to generate all the same stuff via KVM. Someone can always add it later if desired though. - Fix the ipsec removal bug where N_xxx for IPSEC stats weren't renumbered. - Use sysctlbyname() everywhere rather than hardcoded mib values. MFC after: 1 week Approved by: re (rwatson)
* o style(9) nit.rrs2007-06-171-100/+87
| | | | | | | o shorten explainations which are over 80 columns in console. o group rows o clean up and change explanations a little bit. Obtained from: weongyo.jeong@gmail.com
* - Forced commit to update who actually did this code (I forgotrrs2007-06-171-0/+1
| | | | | the obtained from in the original line) Obtained from: Weongyo Jeong (weongyo.jeong@gmail.com)
* sctp_process_inpcb() wants an offset parameter in size_t,delphij2007-06-131-1/+1
| | | | | so define it as what it is expected. This fixes WARNS=3 without NO_WERROR build.
* Adds support for SCTP.rrs2007-06-091-0/+709
OpenPOWER on IntegriCloud