Created
April 12, 2017 20:14
-
-
Save snosrap/2797a0de763486eab4e3b49b537817a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct servent *s = getservbyname("http", NULL); | |
if(!!s) { | |
NSLog(@"%s %i %s", s->s_name, CFSwapInt16BigToHost(s->s_port), s->s_proto); | |
for(size_t i=0; !!s->s_aliases[i]; i++) { | |
NSLog(@"%lu\t%s", i, s->s_aliases[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment