【发布时间】:2016-07-29 12:32:29
【问题描述】:
我正在根据我的需要对 atheros SDK 进行更改,并希望了解结构中使用 (file_t)(-1), 0 的原因和目的:
struct channel channel =
{
(file_t)(-1),
0,
CHANNEL_ETHNUMBER,
CHANNEL_ETHDEVICE,
{
0x00,
0xB0,
0x52,
0x00,
0x00,
0x01
},
{
0x00,
0x00,
0x00,
0x00,
0x00,
0x00
},
0x0000,
#if defined (__linux__)
#elif defined (__APPLE__) || defined (__OpenBSD__)
0,
0,
0,
0,
#elif defined (WINPCAP) || defined (LIBPCAP)
(pcap_t *)(0),
{
0
},
#else
#error "Unknown Environment"
#endif
CHANNEL_TIMEOUT,
CHANNEL_OPTIONS
};
我不是在探索 SDK,如果有人建议开始,我会提供帮助。 谢谢你。
【问题讨论】:
-
什么是
struct channel?它的第一个成员是什么?....所以...不清楚....