Subject: Re: bin/581: small bug in telnet src
To: Brian D. Carlstrom <>
From: matthew green <>
List: netbsd-bugs
Date: 11/21/1994 19:34:34
   change the like to be "SetSockOpt(net,SOL_SOCKET,SO_DEBUG,1)" (to turn it on),
   or change it to "setsockopt(net,SOL_SOCKET,SO_DEBUG,0,0) to just use the
   straight i saidm this code doesnt seem to be in use really or
   this would have been found easily. stumbled on it looking for SockOpt examples

setsockopt(2) says

     setsockopt(int s, int level, int optname, const void *optval, int optlen)

i'd suggest making togdebug() like

static int
    if (net > 0 && setsockopt(net, SOL_SOCKET, SO_DEBUG, (void *) &debug, sizeof(debug)) < 0)
	perror("setsockopt (SO_DEBUG)");
    return 1;