DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 10th April 2009
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Default pftop state query.

Code:
PR   DIR SRC                  DEST                 STATE   AGE   EXP  PKTS BYTES
icmp Out 192.168.100.32:361   192.168.100.22:361    0:0      9     1     2    96
icmp Out 192.168.100.32:361   192.168.100.23:361    0:0      9     1     2    96
tcp  In  192.168.100.7:1029   192.168.100.32:443    4:4   4165 86302 25871 9251K
What does STATE 4:4 means?
Reply With Quote
  #2   (View Single Post)  
Old 10th April 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

The states are printed as integers because there isn't enough space in a 80x25 terminal to print them as strings.. in non-interactive mode you can fix this using the -w argument.

You could also look in /usr/include/netinet/tcp_fsm.h for the names..
Code:
#define TCPS_CLOSED	0	/* closed */
#define TCPS_LISTEN	1	/* listening for connection */
#define TCPS_SYN_SENT	2	/* active, have sent syn */
#define TCPS_SYN_RECEIVED	3	/* have sent and received syn */
/* states < TCPS_ESTABLISHED are those where connections not established */
#define TCPS_ESTABLISHED	4	/* established */
#define TCPS_CLOSE_WAIT	5	/* rcvd fin, waiting for close */
/* states > TCPS_CLOSE_WAIT are those where user has closed */
#define TCPS_FIN_WAIT_1	6	/* have closed, sent fin */
#define TCPS_CLOSING	7	/* closed xchd FIN; await ACK */
#define TCPS_LAST_ACK	8	/* had fin and close; await FIN ACK */
/* states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN */
#define TCPS_FIN_WAIT_2	9	/* have closed, fin is acked */
#define TCPS_TIME_WAIT	10	/* in 2*msl quiet wait after close */
I don't use pftop anymore, these days I just use the systat(1) command.. or.. sudo pfctl -s states.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pftop command not found bsdnewbie999 FreeBSD Ports and Packages 4 23rd February 2009 05:18 AM
How to check CPU state in non-interactive mode? bsddaemon FreeBSD General 2 18th October 2008 04:50 PM
Directory query delboy FreeBSD General 6 8th September 2008 01:51 PM
*BSD support for solid state disks? JMJ_coder General Hardware 3 27th June 2008 11:21 PM
netstat state LISTEN change CTOS OpenBSD General 1 4th May 2008 10:52 PM


All times are GMT. The time now is 08:08 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick