19

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?

rashok
  • 12,790
  • 16
  • 88
  • 100
Lone Learner
  • 18,088
  • 20
  • 102
  • 200

1 Answers1

16

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.

tversteeg
  • 4,717
  • 10
  • 42
  • 77
  • 1
    I type `man -k sockaddr` but result is `sockaddr: nothing appropriate.`. But `socksddr` is located in `man bind`. – alhelal Aug 26 '17 at 08:26