X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fodhcp6c.h;h=98d91dd1bb415eeb637cef789eea2a277095d510;hb=8a8005f7ca8973702b36e711993bfff89ca9600c;hp=928f82f32e1004502ecaf2b61e8439af9e9716d5;hpb=7b22e48fbf23d20d92a4bae581f39ac3704d8bb2;p=odhcp6c.git diff --git a/src/odhcp6c.h b/src/odhcp6c.h index 928f82f..98d91dd 100644 --- a/src/odhcp6c.h +++ b/src/odhcp6c.h @@ -302,6 +302,14 @@ struct odhcp6c_entry { uint8_t auxtarget[]; }; +// Include padding after auxtarget to align the next entry +#define odhcp6c_entry_size(entry) \ + (sizeof(struct odhcp6c_entry) + (((entry)->auxlen + 3) & ~3)) + +#define odhcp6c_next_entry(entry) \ + ((struct odhcp6c_entry *)((uint8_t *)(entry) + odhcp6c_entry_size(entry))) + + struct odhcp6c_request_prefix { uint32_t iaid; uint16_t length;