Good morning every one,

I was trying to create a very simple SDN controller and I’m having difficulties 
creating an SDN packet using sockets in C. I create a regular TCP/IP packet 
using the C library to create sockets and then I fill the buffer this way:

       char message[10];

    struct ofp_header header;
    header.version = OFP_VERSION;
    header.type = OFPT_HELLO;
    header.length = 8;
    header.xid = 13;
    
    memcpy(&header, message, sizeof(struct ofp_header));

    if( send(sock , message , strlen(message), 0) < 0)
    {
            puts("Send failed");
            return 1;
    }

The message is send correctly but in wireshark the packet appears as an unknown 
Openflow packet. I will appreciate if some one can help me.

Respectfully,
Eduard  
_______________________________________________
openflow-discuss mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to