> > +/* Mesh extent address flags */ > > +#define MESH_DATA_NO_EADDR 0x0 > > +#define MESH_DATA_EADD1_EADD2 0x2 > > Just for consistency with the draft I suggest adding/renaming: > > #define MESH_AE_ADD4 0x1 > #define MESH_AE_ADD5_ADD6 0x2 > #define MESH_AE_ADD4_ADD5_ADD6 0x3 Actually, now that I look at it, should we just define #define MESH_FLAGS_AE_A4 0x1 #define MESH_FLAGS_AE_A5_A6 0x2 #define MESH_FLAGS_PS_DEEP 0x4 > > + if (meshdr->flags == MESH_DATA_EADD1_EADD2) { > > + if (mesh_hdr->flags == MESH_DATA_EADD1_EADD2){ > > There are other assigned and reserved bits in the flags field. It's > probably better to do... and then in these two places use if (..->flags & MESH_FLAGS_AE_A5_A6) ? It seems to me that these are actually defined bitwise, 0x1 indicates A4 is in the AE and 0x2 indicates A5 and A6 are present. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part