[lkml]   [2005]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject2.6 kernel network programming
    Hi all,
    can someone tell me how i can listen and accept connections into a port from
    the kernel-space???
    I start listening with the following function :

    struct socket *sock;
    struct sockaddr_in sin;
    int error=0;


    sin.sin_family = AF_INET;
    sin.sin_addr.s_addr = INADDR_ANY;
    sin.sin_port = htons((unsigned short)port);

    error=sock->ops->bind(sock,(struct sockaddr*)&sin,sizeof(sin));

    How about accepting connections and sending some kind of a message for
    Can someone help me please.

    Thanks in advance,

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-05-17 13:36    [W:0.021 / U:160.928 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site