


     ggggeeeettttpppprrrroooottttooooeeeennnntttt((((3333NNNN))))				       ggggeeeettttpppprrrroooottttooooeeeennnntttt((((3333NNNN))))



     NNNNAAAAMMMMEEEE
	  getprotoent, getprotobynumber, getprotobyname, setprotoent,
	  endprotoent -	get protocol entry

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
	  ####iiiinnnncccclllluuuuddddeeee <<<<nnnneeeettttddddbbbb....hhhh>>>>

	  struct protoent *getprotoent()

	  struct protoent *getprotobyname(_n_a_m_e)
	  char *_n_a_m_e;

	  struct protoent *getprotobynumber(_p_r_o_t_o)
	  int _p_r_o_t_o;

	  setprotoent(_s_t_a_y_o_p_e_n)
	  int _s_t_a_y_o_p_e_n

	  endprotoent()

	  cccccccc ............ ----llllnnnneeeetttt

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
	  ggggeeeettttpppprrrroooottttooooeeeennnntttt, ggggeeeettttpppprrrroooottttoooobbbbyyyynnnnaaaammmmeeee, and ggggeeeettttpppprrrroooottttoooobbbbyyyynnnnuuuummmmbbbbeeeerrrr each
	  return a pointer to an object	with the following structure
	  containing the broken-out fields of a	line in	the network
	  protocol data	base, ////eeeettttcccc////pppprrrroooottttooooccccoooollllssss.

	  struct protoent {
		 char	*p_name;      /* official name of protocol */
		 char	**p_aliases;  /* alias list */
		 long	p_proto;      /* protocol number */
	  };

	  The members of this structure	are:

	  pppp____nnnnaaaammmmeeee     The official name of the protocol.

	  pppp____aaaalllliiiiaaaasssseeeessss  A zero terminated list of alternate names for the
		     protocol.

	  pppp____pppprrrroooottttoooo    The protocol number.

	  ggggeeeettttpppprrrroooottttooooeeeennnntttt reads the	next line of  the  file,  opening  the
	  file if necessary.

	  sssseeeettttpppprrrroooottttooooeeeennnntttt opens and	rewinds	the  file.   If	 the  _s_t_a_y_o_p_e_n
	  flag is non-zero, the	net data base will not be closed after
	  each call to ggggeeeettttpppprrrroooottttooooeeeennnntttt  (either  directly,	or  indirectly
	  through one of the other ``getproto''	calls).

	  eeeennnnddddpppprrrroooottttooooeeeennnntttt closes the file.



     Page 1					   (last mod. 1/14/87)






     ggggeeeettttpppprrrroooottttooooeeeennnntttt((((3333NNNN))))				       ggggeeeettttpppprrrroooottttooooeeeennnntttt((((3333NNNN))))



	  ggggeeeettttpppprrrroooottttoooobbbbyyyynnnnaaaammmmeeee and ggggeeeettttpppprrrroooottttoooobbbbyyyynnnnuuuummmmbbbbeeeerrrr sequentially search from
	  the  beginning of the	file until a matching protocol name or
	  protocol number is found, or until EOF is encountered.

     FFFFIIIILLLLEEEESSSS
	  ////eeeettttcccc////pppprrrroooottttooooccccoooollllssss

     LLLLIIIINNNNKKKKIIIINNNNGGGG
	  This library is accessed by specifying  ----llllnnnneeeetttt	 as  the  last
	  argument to the compile line,	e.g.:

	    cccccccc ----oooo pppprrrroooogggg pppprrrroooogggg....cccc ----llllnnnneeeetttt

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
	  protocols(4N).

     DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
	  Null pointer (0) returned on EOF or error.

     BBBBUUUUGGGGSSSS
	  All information is contained in a static area	so it must  be
	  copied  if  it  is to	be saved.  Only	the Internet protocols
	  are currently	understood.
































     Page 2					   (last mod. 1/14/87)



