In addition to binding a socket to a local address or connecting it to a destination address, application programs need a method to control the behavior of a socket. For example, when using protocols that use timeout and retransmission, the application program may want to obtain or set the timeout parameters. An application program may also want to control the allocation of buffer space, determine if the socket allows transmission of broadcast, or control processing of out-of-band data. The ioctl-style getsockopt() and setsockopt() calls provide the means to control socket operations. The getsockopt() call allows an application program to request information about socket options. The setsockopt() call allows an application program to set a socket option using the same set of values obtained with the getsockopt() call. Not all socket options apply to all sockets. The options that can be set depend on the current state of the socket and the underlying protocol being used.