setsockopt(...SO_KEEPALIVE,...) returns ENOPROTOOPT

Discussion in 'Linux Networking' started by Jarek, Feb 22, 2005.

  1. Jarek

    Jarek Guest

    Whats wrong in this code:

    tCPClient->tcpSocket = socket( AF_INET, SOCK_STREAM, 0 );
    optval = 1;
    rc = setsockopt( tCPClient->tcpSocket, SOL_PACKET, SO_KEEPALIVE,
    &optval, sizeof(optval) );


    After this rc has value 92 (ENOPROTOOPT).

    According to source code of setsockopt this should never happend.

    Any ideas ?

    Jarek, Feb 22, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.