lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Setting source port number for UDP send


From: Marco Jakobs
Subject: [lwip-users] Setting source port number for UDP send
Date: Thu, 10 Dec 2009 23:15:10 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Hi to all,

i'm looking for a way to set the source port of an UDP send to a defined number, it seems that lwIP chooses this number randomly. Is there a way to set a value in the netbuf or the netconn to a defined port number in my UDP send part?

        netconn_connect(tftptxcon,&modsrv_addr,ip_data_out.port);    // Open connection
        tftpsrvbuf=netbuf_new();        // Create netbuf
        txdata=netbuf_ref(tftpsrvbuf,ip_data_out.buf,ip_data_out.ptr);    // Assign the data
        netconn_send(tftptxcon,tftpsrvbuf);        // Send the UDP data
        netconn_delete(tftptxcon);        // Delete the connection
        netbuf_delete(tftpsrvbuf);    // Delete the netbuf

Thank you all for your ideas!

Marco

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]