Skip to content

Instantly share code, notes, and snippets.

@shichao-an
Created June 19, 2015 17:11
Show Gist options
  • Save shichao-an/af1102b95566ee43cde7 to your computer and use it in GitHub Desktop.
Save shichao-an/af1102b95566ee43cde7 to your computer and use it in GitHub Desktop.
#include <arpa/inet.h>
int inet_aton(const char *strptr, struct in_addr *addrptr);
/* Returns: 1 if string was valid, 0 on error */
in_addr_t inet_addr(const char *strptr);
/* Returns: 32-bit binary network byte ordered IPv4 address; INADDR_NONE if error */
char *inet_ntoa(struct in_addr inaddr);
/* Returns: pointer to dotted-decimal string */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment