LINUX.ORG.RU

История изменений

Исправление bk_, (текущая версия) :

Могу ошибаться, но, по ходу, BSD не поддерживает опцию SOL_RAW в setsockopt (как оно у тебя скомпилировалось вообще?).

Вот выдержка из мана (MacOSX, не BSD):

The following options are recognized at the socket level.  Except as noted, each may be examined with getsockopt() and set with setsockopt().

           SO_DEBUG        enables recording of debugging information
           SO_REUSEADDR    enables local address reuse
           SO_REUSEPORT    enables duplicate address and port bindings
           SO_KEEPALIVE    enables keep connections alive
           SO_DONTROUTE    enables routing bypass for outgoing messages
           SO_LINGER       linger on close if data present
           SO_BROADCAST    enables permission to transmit broadcast messages
           SO_OOBINLINE    enables reception of out-of-band data in band
           SO_SNDBUF       set buffer size for output
           SO_RCVBUF       set buffer size for input
           SO_SNDLOWAT     set minimum count for output
           SO_RCVLOWAT     set minimum count for input
           SO_SNDTIMEO     set timeout value for output
           SO_RCVTIMEO     set timeout value for input
           SO_TYPE         get the type of the socket (get only)
           SO_ERROR        get and clear error on the socket (get only)
           SO_NOSIGPIPE    do not generate SIGPIPE, instead return EPIPE
           SO_NREAD        number of bytes to be read (get only)
           SO_NWRITE       number of bytes written not yet sent by the protocol (get only)
           SO_LINGER_SEC   linger on close if data present with timeout in seconds

Да и гуглеж по SOL_RAW указывает только на линукс.

Однако: http://sock-raw.org/papers/sock_raw . Как ты создаешь сокет?

Исходная версия bk_, :

Могу ошибаться, но, по ходу, BSD не поддерживает опцию SOL_RAW в setsockopt.

Вот выдержка из мана (MacOSX, не BSD):

The following options are recognized at the socket level.  Except as noted, each may be examined with getsockopt() and set with setsockopt().

           SO_DEBUG        enables recording of debugging information
           SO_REUSEADDR    enables local address reuse
           SO_REUSEPORT    enables duplicate address and port bindings
           SO_KEEPALIVE    enables keep connections alive
           SO_DONTROUTE    enables routing bypass for outgoing messages
           SO_LINGER       linger on close if data present
           SO_BROADCAST    enables permission to transmit broadcast messages
           SO_OOBINLINE    enables reception of out-of-band data in band
           SO_SNDBUF       set buffer size for output
           SO_RCVBUF       set buffer size for input
           SO_SNDLOWAT     set minimum count for output
           SO_RCVLOWAT     set minimum count for input
           SO_SNDTIMEO     set timeout value for output
           SO_RCVTIMEO     set timeout value for input
           SO_TYPE         get the type of the socket (get only)
           SO_ERROR        get and clear error on the socket (get only)
           SO_NOSIGPIPE    do not generate SIGPIPE, instead return EPIPE
           SO_NREAD        number of bytes to be read (get only)
           SO_NWRITE       number of bytes written not yet sent by the protocol (get only)
           SO_LINGER_SEC   linger on close if data present with timeout in seconds

Да и гуглеж по SOL_RAW указывает только на линукс.

Однако: http://sock-raw.org/papers/sock_raw . Как ты создаешь сокет?