Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find man pages for C structs (struct sockaddr_in)?

I am having a hard time finding man pages for the structures used in socket. So I am currently learning about them from a separate online tutorial. But it would be nice to know how to lookup these structures in the man pages itself.

I am using a Debian 8.3 Linux system.

For example, I found information about struct addrinfo in man getaddrinfo.

But I have not been able to find information about struct sockaddr_in in any man page. Which man page contains the details about this struct? And how to find out the man pages for such structures in general?

like image 583
Lone Learner Avatar asked Sep 10 '16 07:09

Lone Learner


1 Answers

You can find that specific structure by typing man 7 ip and then searching manually for it or pressing / and typing sockaddr_in.

If you don't know what section to look in you can try using a quick search with man -k sockaddr_in. If that doesn't give you the result you are looking for try brute-forcing it with man -K sockaddr_in, this might be very slow because it will scan all the man files on your system.

@Jean-FrançoisFabre his comment about using a search engine is probably the fastest way to find the information you want though.

like image 165
tversteeg Avatar answered Oct 17 '22 15:10

tversteeg