Skip to content

Commit

Permalink
Merge pull request #241 from jow-/socket-local-fanout-decl
Browse files Browse the repository at this point in the history
socket: provide local definition of `struct fanout_args`
  • Loading branch information
jow- authored Oct 17, 2024
2 parents 402280d + 79ccd9c commit aa18952
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions lib/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,12 +1396,23 @@ static struct_t st_tpacket_auxdata = {
}
};

struct fanout_args_local {
#if __BYTE_ORDER == __LITTLE_ENDIAN
uint16_t id;
uint16_t type_flags;
#else
uint16_t type_flags;
uint16_t id;
#endif
uint32_t max_num_members;
};

static struct_t st_fanout_args = {
.size = sizeof(struct fanout_args),
.size = sizeof(struct fanout_args_local),
.members = (member_t []){
STRUCT_MEMBER_NP(fanout_args, id, DT_UNSIGNED),
STRUCT_MEMBER_NP(fanout_args, type_flags, DT_UNSIGNED),
STRUCT_MEMBER_NP(fanout_args, max_num_members, DT_UNSIGNED),
STRUCT_MEMBER_NP(fanout_args_local, id, DT_UNSIGNED),
STRUCT_MEMBER_NP(fanout_args_local, type_flags, DT_UNSIGNED),
STRUCT_MEMBER_NP(fanout_args_local, max_num_members, DT_UNSIGNED),
{ 0 }
}
};
Expand Down

0 comments on commit aa18952

Please sign in to comment.