ok I have a structure:
struct dhcp_ippacket_t {
struct dhcp_ethhdr_t ethh;
struct dhcp_iphdr_t iph;
uint8_t payload[DHCP_IP_PLEN];
} __attribute__((packed));
this struct is fed to a call to recv as the buffer to fill (or rather a pointer to it is).
What I don't get is what does this last part mean? the __attribute__((packed));
and I assuming by passing the pointer to this structure to recv as the buffer, then the payload array is the "buffer" part getting filled.
If anyone can point me correctly, it would be greatly appreciated!
Thanks!
DanWiFi
struct dhcp_ippacket_t {
struct dhcp_ethhdr_t ethh;
struct dhcp_iphdr_t iph;
uint8_t payload[DHCP_IP_PLEN];
} __attribute__((packed));
this struct is fed to a call to recv as the buffer to fill (or rather a pointer to it is).
What I don't get is what does this last part mean? the __attribute__((packed));
and I assuming by passing the pointer to this structure to recv as the buffer, then the payload array is the "buffer" part getting filled.
If anyone can point me correctly, it would be greatly appreciated!
Thanks!
DanWiFi