blob: a935d5a6bae9812e859039949ec81bdaf48a6365 [file] [log] [blame]
bigbiff bigbiff9c754052013-01-09 09:09:08 -05001/*
2** Copyright 2002 University of Illinois Board of Trustees
3** Copyright 2002 Mark D. Roth
4** All rights reserved.
5**
6** inet_aton.c - inet_aton() function for compatibility library
7**
8** Mark D. Roth <roth@uiuc.edu>
9** Campus Information Technologies and Educational Services
10** University of Illinois at Urbana-Champaign
11*/
12
13#include <sys/socket.h>
14#include <netinet/in.h>
15#include <arpa/inet.h>
16
17
18int
19inet_aton(const char *cp, struct in_addr *inp)
20{
21 inp->s_addr = inet_addr(cp);
22 if (inp->s_addr == -1)
23 return 0;
24 return 1;
25}
26
27