[syslinux] Sending UDP packets from comboot

Sebastian Herbszt herbszt at gmx.de
Sat May 30 11:49:27 PDT 2009


Stefan Thomanek wrote:
> Seems i need some help on this again.
> I'm already able to send UDP packets from my module, with the correct 
> destination IP, source and destination port.

Have you tried a different destination than 255.255.255.255?
I changed it to 255.255.255.254 and it didn't send out the udp packet anymore.

> But: When i try to send some test data, the result is.. somehow weird.
> my struct is
> 
> struct teststruct {
>    uint16_t var1;
>    uint8_t var2;
>    uint16_t var3; };
> 
> and i fill it with
>  var1 = 12345;
>  var2 = 0xFE;
>  var3 = 54321;
> 
> When i capture this packet with wireshark, i receive an udp broadcast 
> with the following content
> > Data (6 bytes)
>  Data: 0000FFFFFFFF
> 
> It looks like the pointer to my data isn't correct. I expected something 
> like this
> > Data (5 bytes)
> Data: 3930FE31D4
> 
> Well, not exact, but the struct is 5 bytes long, isn't it?
> The complete source code is attached to this mail.
> Could anyone please take a look inside the text file and tell me where 
> i've made mistakes?
> Thanks!

Looking at the PXE spec there is a PXENV_UDP_OPEN call which you don't
use. Shouldn't it be called before PXENV_UDP_WRITE?

- Sebastian




More information about the Syslinux mailing list