[syslinux] Sending UDP packets from comboot

pxelinux at myserver.ch pxelinux at myserver.ch
Sun Sep 20 07:17:55 PDT 2009


Thanks for your samples Stefan

I'm not able to send a unicast, if I change args.ip = 4294967295; // =
255.255.255.255 to something different, ie: args.ip = 3232297228; // =
192.168.241.12 according to wireshark there is no packet sent ...
Is unicast not possible with t_PXENV_UDP_WRITE ?

Daniel

-----Original Message-----
From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
Behalf Of Stefan Thomanek
Sent: Samstag, 30. Mai 2009 19:00
To: For discussion of Syslinux and tftp-hpa
Subject: Re: [syslinux] Sending UDP packets from comboot

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.
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!

H. Peter Anvin schrieb:
> H. Peter Anvin wrote:
>   
>>> args.gw = inet_addr("0.0.0.0");
>>> args.src_port = 4711;
>>>       
>> For what it's worth, Syslinux itself uses port numbers between 49152 
>> and 57343.
>>
>>     
>>> args.dst_port = 4799;
>>>       
>
> Oh yes, you need to use htons() on these, I'm pretty sure.
>
> 	-hpa
>
>   





More information about the Syslinux mailing list