daniel_kohler 发表于 2012-06-13 05:58

struct interface这个结构体在什么地方定义的?

在读dhcpcd的源代码的时候,里面很多struct interface结构体,但就是找不到这个结构体在什么地方声明,定义的。

Hetflyter 发表于 2012-06-13 08:53

我在busybox种的udhcp和另外独立的udhcp源码中都没有找到你说的这个结构呢?你用的什么版本啊?回复 1# daniel_kohler


   

daniel_kohler 发表于 2012-06-13 12:19

回复 2# Hetflyter


    dhcpcd-5.2.10

Hetflyter 发表于 2012-06-13 13:31

我下了你说的 dhcpcd-5.2.10版本,在dhcpcd.h里第48行就看到了你说的结构了struct interface {
        char name;
        struct if_state *state;

        int flags;
        sa_family_t family;
        unsigned char hwaddr;
        size_t hwlen;
        int metric;
        int carrier;
        int wireless;
        char ssid;

        int raw_fd;
        int udp_fd;
        int arp_fd;
        size_t buffer_size, buffer_len, buffer_pos;
        unsigned char *buffer;

        struct in_addr addr;
        struct in_addr net;
        struct in_addr dst;

        char leasefile;
        time_t start_uptime;

        unsigned char *clientid;

        struct interface *next;
};回复 3# daniel_kohler


   

daniel_kohler 发表于 2012-06-13 13:55

回复 4# Hetflyter


    我勒个去,sourceinsight里面忘了添加.h文件了,哈哈。
页: [1]
查看完整版本: struct interface这个结构体在什么地方定义的?