All pastes #600118 Raw Edit

Anonymous

public text v1 · immutable
#600118 ·published 2007-07-02 17:12 UTC
rendered paste body
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <unistd.h>
#include <netinet/sctp.h>
#include <sys/uio.h>



int main() {

        struct sockaddr_in addr[1];
        addr->sin_family = AF_INET;
        addr->sin_addr.s_addr = inet_addr("127.0.0.1");
        addr->sin_port = htons(8555);
        int sd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);

        if(bind(sd, (struct sockaddr *)&addr,0x10 )){perror("bind");}
        listen(sd, 1);
}