SCCS-vsn: sys/kern/uipc_socket.c 6.18
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)uipc_socket.c 6.17 (Berkeley) %G%
+ * @(#)uipc_socket.c 6.18 (Berkeley) %G%
return (ENOPROTOOPT);
} else {
m = m_get(M_WAIT, MT_SOOPTS);
return (ENOPROTOOPT);
} else {
m = m_get(M_WAIT, MT_SOOPTS);
+ m->m_len = sizeof (int);
+
switch (optname) {
case SO_LINGER:
switch (optname) {
case SO_LINGER:
case SO_KEEPALIVE:
case SO_REUSEADDR:
case SO_BROADCAST:
case SO_KEEPALIVE:
case SO_REUSEADDR:
case SO_BROADCAST:
- m->m_len = sizeof (int);
*mtod(m, int *) = so->so_options & optname;
break;
*mtod(m, int *) = so->so_options & optname;
break;
+ case SO_TYPE:
+ *mtod(m, int *) = so->so_type;
+ break;
+
case SO_ERROR:
*mtod(m, int *) = so->so_error;
so->so_error = 0;
case SO_ERROR:
*mtod(m, int *) = so->so_error;
so->so_error = 0;