next up previous
Next: 7 TCP Up: 6 The Socket API Previous: 6.0.4 The Write() call

6.0.5 The Setsockopt() call

The Setsockopt() call has five arguments. The arguments level and optname specify the option that you want to set. The simulator supports only the IPPROTO_IP level and the IP_FW_SET, IP_NAT_SET, and IP_IF_SET options (defined in $PDIR/include/Socket.h). The option value for the IP_IF_SET option needs to be a pointer to a struct if_info (defined in $PDIR/include/route.h). The data structures of the option values for IP_FW_SET and IP_NAT_SET have not been defined.


next up previous
Next: 7 TCP Up: 6 The Socket API Previous: 6.0.4 The Write() call