52 int afc = (
type ==
'D' ||
type ==
'N') ? 1 : 0;
67static void test(
const char *
name,
int prefix_size,
int prefix_fill,
68 int stride,
const char *packets)
79 memset(buf, prefix_fill, prefix_size);
93 test(
"payload", 0, 0x00, 188,
"DDDDDDDDDDDD");
94 test(
"null, afc 0", 0, 0x00, 188,
"nnnnnnnnnnnn");
95 test(
"payload, then null with afc 0", 0, 0x00, 188,
"Dnnnnnnnnnnn");
96 test(
"payload, then null with afc 0, 192", 0, 0x00, 192,
"Dnnnnnnnnnnn");
97 test(
"payload, then null with afc 0, 204", 0, 0x00, 204,
"Dnnnnnnnnnnn");
98 test(
"null, then payload with afc 0", 0, 0x00, 188,
"Nddddddddddd");
99 test(
"payload and null with afc 0, mixed", 0, 0x00, 188,
"DnDnDnDnDnDn");
100 test(
"payload, a few null with afc 0", 0, 0x00, 188,
"DDnDDnDDnDDD");
101 test(
"null, then PID 0x1FF with afc 0", 0, 0x00, 188,
"nLLLLLLLLLLL");
102 test(
"null, then PID 0x1F00 with afc 0", 0, 0x00, 188,
"nHHHHHHHHHHH");
105 test(
"null with afc 0, after 0x00", 5, 0x00, 188,
"nnnnnnnnnnnn");
106 test(
"payload with afc 0, after 0xFF", 5, 0xFF, 188,
"dddddddddddd");
107 test(
"payload, after 0xFF", 5, 0xFF, 188,
"DDDDDDDDDDDD");
#define i(width, name, range_min, range_max)
__device__ int printf(const char *,...)
Memory handling functions.
static void test(const char *name, int prefix_size, int prefix_fill, int stride, const char *packets)
static void put_packet(uint8_t *p, char type)
This structure contains the data a format has to probe a file.
int buf_size
Size of buf except extra allocated bytes.