This SOL_SOCKET get-only option is used to get the approximate free space
of send buffer.
sogetopt(struct socket *so, struct sockopt *sopt)
{
int error, optval;
+ long optval_l;
struct linger l;
struct timeval tv;
#ifdef INET
error = sooptcopyout(sopt, &tv, sizeof tv);
break;
+ case SO_SNDSPACE:
+ optval_l = ssb_space(&so->so_snd);
+ error = sooptcopyout(sopt, &optval_l, sizeof(optval_l));
+ break;
+
default:
error = ENOPROTOOPT;
break;
#define SO_ERROR 0x1007 /* get error status and clear */
#define SO_TYPE 0x1008 /* get socket type */
/*efine SO_PRIVSTATE 0x1009 get/deny privileged state */
+#define SO_SNDSPACE 0x100a /* get appr. send buffer free space */
/*
* Structure used for manipulating linger option.