[syslinux] Sending UDP packets from comboot

H. Peter Anvin hpa at zytor.com
Sat May 30 12:35:42 PDT 2009


Stefan Thomanek wrote:
> 
> struct teststruct {
>    uint16_t var1;
>    uint8_t var2;
>    uint16_t var3; };
> 

That's a 6-byte structure, unless you specify __attribute__((packed)).

> Could anyone please take a look inside the text file and tell me where
> i've made mistakes?

You're overwriting your test data structure with your parameter structure:


    // Bounce testdata
    memcpy(__com32.cs_bounce, &test, sizeof(test));

   [...]

    // Bounce send struct
    memcpy(__com32.cs_bounce, &args, sizeof(args));


One way to do this is to put both your args and your data structure into
a bigger structure; another option is to calculate where in the bounce
buffer you can put your data.  The former is easier when you have
fixed-size data, the latter can be more general.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the Syslinux mailing list