File:  [DVB] / dietlibc / libugly / getprotobynumber.c
Revision 1.1: download - view: text, annotated - select for diffs
Thu Oct 25 22:23:55 2001 UTC (22 years, 7 months ago) by fefe
Branches: MAIN
CVS tags: finnland_test_200301, branch_rc14_fieldtest_finnland, branch_rc13_fieldtest_finnland, branch_rc12_fieldtest_finnland, branch_rc10_fieldtest_finnland, RELEASE_finnland_200301_1, RC12_FIELDTEST_FINNLAND, RC10_FIELDTEST_FINNLAND, HEAD
rewrite getproto* to parselib (and add ..._r versions)

#include <string.h>
#include <netdb.h>

extern struct protoent __protoent_pw;
extern char __protoent_buf[1000];

struct protoent *getprotobynumber(int proto) {
  struct protoent* tmp;
  if (getprotobynumber_r(proto,&__protoent_pw,__protoent_buf,sizeof(__protoent_buf),&tmp)==0)
    return tmp;
  return 0;
}

LinuxTV legacy CVS <linuxtv.org/cvs>