inet.c 179 Bytes
Newer Older
1
#include "inet.h"
2

3 4 5 6 7 8 9 10 11
int inet_aton(const char *cp, struct in_addr *inp) {
  inp->s_addr = inet_addr(cp);

  if (inp->s_addr == INADDR_NONE) {
          return 0;
  }

  return 1;
}