#ifndef TRAFGEN_CONF #define TRAFGEN_CONF #include #include #include #define TYPE_INC 0 #define TYPE_DEC 1 enum csum { CSUM_IP, CSUM_UDP, CSUM_TCP, CSUM_UDP6, CSUM_TCP6, }; struct counter { int type; uint8_t min, max, inc, val; off_t off; }; struct randomizer { off_t off; }; struct csum16 { off_t off, from, to; enum csum which; }; struct packet { uint8_t *payload; size_t len; }; struct packet_dyn { struct counter *cnt; size_t clen; struct randomizer *rnd; size_t rlen; struct csum16 *csum; size_t slen; }; static inline bool packet_dyn_has_elems(struct packet_dyn *p) { return (p->clen || p->rlen || p->slen); } static inline bool packet_dyn_has_only_csums(struct packet_dyn *p) { return (p->clen == 0 && p->rlen == 0 && p->slen); } extern void compile_packets_str(char *str, bool verbose, unsigned int cpu); extern void compile_packets(char *file, bool verbose, unsigned int cpu, bool invoke_cpp, char *const cpp_argv[]); extern void cleanup_packets(void); extern void set_fill(uint8_t val, size_t len); extern struct packet *current_packet(void); #endif /* TRAFGEN_CONF */ elected'>master net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-23 17:40:49 +0100
committerDave Airlie <airlied@redhat.com>2012-04-23 17:41:17 +0100
commit8353e6c632aeaea1470a286b83e68ca233073068 (patch)
tree8d2345f96834e4242adb773dece50cbeee1fc0ed /include/drm/drm_edid.h
parentc09dedb7a50e23f0166e0bbae61c75c7ec23cf7f (diff)
drm/edid: Add packed attribute to new gtf2 and cvt structs
The new structs added in struct detailed_data_monitor_range must be marked with packed attribute although the outer struct itself is already marked as packed. Otherwise these 7-bytes structs may be aligned, and give the wrong position and size for the data. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm_edid.h')