Skip to content

Instantly share code, notes, and snippets.

@shizzard
Created September 3, 2014 09:01
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 shizzard/37b6baae185a54657c00 to your computer and use it in GitHub Desktop.
Save shizzard/37b6baae185a54657c00 to your computer and use it in GitHub Desktop.
resolve_family({_,_,_,_}, auto) ->
inet;
resolve_family({_,_,_,_,_,_,_,_}, auto) ->
inet6;
resolve_family(IP, auto) ->
throw({error, {strange_family, IP}});
resolve_family(_, F) ->
F.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment