Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
RFC(1)			    General Commands Manual			RFC(1)

       rfc -   search rfc-index	for specified RFC and list topic

       rfc [ RFC-number	] [ -dhiklmnoprsuw  ]

       RFC Is a	utility	that allows you	to quickly find	RFCs (Proposed or cur-
       rent Internet standards specifications).	 It can	be used	to find	 which
       RFCs  contain  information  relevent to your search and then optionally
       display,	dump to	file, or mail them.

	      search rfc-index for the specified RFC and list its topic

       -d rfc-number [ /path/ ]
	      Dumps plain text RFC. default is current dir

       -h     displays summarized help

       -i     Updates the $indexpath via the $viewer

       -k     Keyword; same as -s

       -l rfc-number
	      Spawns $viewer to	the specified RFC

       -m rfc-number [opt subject]
	      Emails the RFC to	given address

       -n port/daemon
	      Local search for non-standard  service/port  nums	 (BO,  Netbus,
	      etc) This	is essentially the same	as a grep on /etc/services but
	      with the additional info from NMAP's large known-ports database.
	      This will	have entries that INI's	assigned numbers database will

       -o rfc-number
	      Dumps RFC	to STDOUT

       -p     Connect to INI's assigned	numbers	database for protocol  numbers
	      or services/ports	association.  This is the standards based well
	      known ports and protocols	reference.  Very handy if you are set-
	      ting up firewalls	or looking at logged output.

       -r     Go wild with your	own regexp on rfc-index

       -s string
	      Search the index for specific string

       -u server-number
	      Sets the base URL	to the number listed with -w

       -w     Lists the	available webservers to	display

       rfc will	obey the $RFCVIEWER environment	variable if it is set.	If un-
       defined it will look in your $PATH for w3m  and	then  lynx.   You  can
       hard-code which one you want in the top portion of the script.

       Under the @URLS array you can now have a	URl start with an ! to have it
       be treated as html rather than text.  Add as many URLs as  you  please.
       This  is	 also  where you would add your	local repository of rfcs, like

       In order	to make	this utility available to all system users the default
       $indexpath and $servpath	is set to /usr/local/etc/.  If you do not have
       root abilities on this box then you can manually	 edit  the  script  to
       specify an area that you	do have	permissions to write to.

	$ rfc -k mpls.*ldp
	The Result:
	3035 MPLS using	LDP and	ATM VC Switching. B. Davie, J.
	     Lawrence, K. McCloghrie, E. Rosen,	G. Swallow, Y.
	     Rekhter, P. Doolan. January 2001. (Format:
	     TXT=46463 bytes) (Status: US:) (Status: PROPOSED

	$ rfc -l 3035  would then use w3m or lynx to view the
		       discovered RFC

	$ rfc 822
	The Result:
	0822 Standard for the format of	ARPA Internet text
	     messages. D.  Crocker. Aug-13-1982. (Format:
	     TXT=109200	bytes) (Obsoletes RFC0733) (Obsoleted
	     by	RFC2822) (Updated by RFC1123, RFC1138, RFC1148,
	     RFC1327, RFC2156) (Also STD0011) (Status: US:)
	     (Status: STANDARD)

	$ rfc -p ip 8
	Making connection to server....

	    8  EGP  Exterior Gateway Protocol	[RFC888,DLM1]

	    [RFC888] Seamonson,	L., and	E. Rosen, "STUB"
	    Exterior Gateway Protocol",	RFC 888, BBN
	    Communications Corporation,	January	1984.
	    [DLM1] David Mills	<Mills@HUEY.UDEL.EDU>

	$ netstat -an
	  tcp	0  0*	 LISTEN
	  We see port 7100 listening, what is it?

	$ rfc -n 7100
	Looking	up service...
	font-service	  7100/tcp   # X Font Service
	font-service	  7100/udp   # X Font Service

	      This  is	the default $indexpath with all	of the RFC numbers and
	      brief descriptions of content.  Installed	with the  rfc  -i  op-

	      Initialization  file  with  your	BaseURL	for grabbing RFCs (set
	      with -u)

	      This is the default $servpath for	 the  non-standard  ports/ser-
	      vices  database from NMAP.  This is installed with the rfc -n -i

       The default base	URL is

       By default, the program will search your	path for w3m or	lynx  and  use
       the first one found as the viewer; if you want to change	this, edit the

       Please send comments/bugfixes mailto:

       Some sites have leading	0's  on	 RFCs  <  1000,	 ie,  RFC0822  may  be
       rfc822.txt  or  rfc0822.txt.  I have yet	to implement a feature to work
       around this.  Most of the sub 1k	RFCs have newer	counter	 parts.	  Look
       for  "obsoleted	by" in the output from -k -s or	-r to find the more up
       to date RFC.  The real bug is  the  non-standardized  rfc  distibution.	has them with leading zeros, so	I'm sticking with that.

       Let me know if you find any.  This is a work in progress	but I'm	really
       happy with how easy it's	made my	life.

       Derrick D. Daugherty <>
       Send bug	reports	or comments to <>

       LYNX(1),	W3M(1),	SENDMAIL(1)



Want to link to this manual page? Use this URL:

home | help