sockets - what is parameter level in getsockopt? -
sockets - what is parameter level in getsockopt? -
luckily got link here [sol_socket in getsockopt()
but confusing me.
one replied "sol_socket" socket layer?
what socket layer?
is there other options available parameter?
what happens if pass parameter sol_socket , sol stands for?
i using unix.
"socket layers" refers socket abstraction of operative system. options can set independently of type of socket handling. in practice, may interested in tcp/ip sockets, there udp/ip sockets, unix domain sockets, , others. options related sol_socket
can applied of them. the list provided in reply of other question has of them; in manual page of sockets there more, under "socket options" section.
sol_socket
constant "protocol number" associated level. other protocols or levels, can utilize getprotoent
obtain protocol number name, or check manual of protocol - example, in manual page of ip described constants protocol numbers of ip (ipproto_ip
), tcp (ipproto_tcp
) , udp (ipproto_udp
), while manual page of unix sockets says that, historial reasons, protocol options must set using sol_socket
too. moreover, can find list of supported protocols scheme in /etc/protocols
. and, of course, options supported each of protocols in manuals: ip, tcp, udp, unix sockets...
sockets unix
Comments
Post a Comment