getservent.c File Reference

#include <sys/types.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <net/hton.h>
#include <net/gen/netdb.h>

Include dependency graph for getservent.c:

Go to the source code of this file.

Defines

#define MAXALIASES   35

Functions

static char *any _ARGS ((char *cp, char *match))
void setservent (int f)
void endservent ()
serventgetservent ()
static char * any (char *cp, char *match)

Variables

static FILEservf = NULL
static char line [BUFSIZ+1]
static struct servent serv
static char * serv_aliases [MAXALIASES]
int _serv_stayopen


Define Documentation

#define MAXALIASES   35
 

Definition at line 32 of file getservent.c.


Function Documentation

static char* any _ARGS (char *cp, char *match  )  [static]
 

static char* any char *  cp,
char *  match
[static]
 

Definition at line 113 of file getservent.c.

References c, and mp.

void endservent  ) 
 

Definition at line 54 of file getservent.c.

References _serv_stayopen, fclose(), NULL, and servf.

Referenced by getservbyname(), and getservbyport().

struct servent* getservent  ) 
 

Definition at line 64 of file getservent.c.

References _PATH_SERVICES, any(), atoi, BUFSIZ, cp, fgets(), fopen(), htons, MAXALIASES, NULL, p, servent::s_aliases, servent::s_name, servent::s_port, servent::s_proto, serv, serv_aliases, and servf.

Referenced by getservbyname(), and getservbyport().

void setservent int  f  ) 
 

Definition at line 43 of file getservent.c.

References _PATH_SERVICES, _serv_stayopen, fopen(), NULL, rewind(), and servf.

Referenced by getservbyname(), and getservbyport().


Variable Documentation

int _serv_stayopen
 

Definition at line 38 of file getservent.c.

Referenced by endservent(), getservbyname(), getservbyport(), and setservent().

char line[BUFSIZ+1] [static]
 

Definition at line 35 of file getservent.c.

struct servent serv [static]
 

Definition at line 36 of file getservent.c.

Referenced by getservent().

char* serv_aliases[MAXALIASES] [static]
 

Definition at line 37 of file getservent.c.

Referenced by getservent().

FILE* servf = NULL [static]
 

Definition at line 34 of file getservent.c.

Referenced by endservent(), getservent(), and setservent().


Generated on Fri Apr 14 23:16:49 2006 for minix by  doxygen 1.4.6