Skip to content

Structs which are memcpy()d into should have the packed attribute #4

@mkcms

Description

@mkcms

These structs, which represent a region of memory, should have __attribute__((packed)), since memcpy() is called to copy memory into them. It's only by chance that the library works now (their members happen to be packed together on the platform of choice that the library is tested on).

struct flowset_header
{
uint16_t flowset_id;
uint16_t length;
};
struct data_template_header
{
uint16_t template_id;
uint16_t field_count;
};
struct option_template_header
{
uint16_t template_id;
uint16_t option_scope_length;
uint16_t option_length;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions