Skip to content

Instantly share code, notes, and snippets.

@shichao-an
Created June 19, 2015 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shichao-an/a4f313716c78362d0b49 to your computer and use it in GitHub Desktop.
Save shichao-an/a4f313716c78362d0b49 to your computer and use it in GitHub Desktop.
#include <arpa/inet.h>
int inet_pton(int family, const char *strptr, void *addrptr);
/* Returns: 1 if OK, 0 if input not a valid presentation format, -1 on error */
const char *inet_ntop(int family, const void *addrptr, char *strptr, size_t len);
/* Returns: pointer to result if OK, NULL on error */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment