OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [userland/] [route/] [include/] [interface.h] - Blame information for rev 745

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 745 simons
struct user_net_device_stats {
2
    unsigned long rx_packets;   /* total packets received       */
3
    unsigned long tx_packets;   /* total packets transmitted    */
4
    unsigned long rx_bytes;     /* total bytes received         */
5
    unsigned long tx_bytes;     /* total bytes transmitted      */
6
    unsigned long rx_errors;    /* bad packets received         */
7
    unsigned long tx_errors;    /* packet transmit problems     */
8
    unsigned long rx_dropped;   /* no space in linux buffers    */
9
    unsigned long tx_dropped;   /* no space available in linux  */
10
    unsigned long rx_multicast; /* multicast packets received   */
11
    unsigned long rx_compressed;
12
    unsigned long tx_compressed;
13
    unsigned long collisions;
14
 
15
    /* detailed rx_errors: */
16
    unsigned long rx_length_errors;
17
    unsigned long rx_over_errors;       /* receiver ring buff overflow  */
18
    unsigned long rx_crc_errors;        /* recved pkt with crc error    */
19
    unsigned long rx_frame_errors;      /* recv'd frame alignment error */
20
    unsigned long rx_fifo_errors;       /* recv'r fifo overrun          */
21
    unsigned long rx_missed_errors;     /* receiver missed packet     */
22
    /* detailed tx_errors */
23
    unsigned long tx_aborted_errors;
24
    unsigned long tx_carrier_errors;
25
    unsigned long tx_fifo_errors;
26
    unsigned long tx_heartbeat_errors;
27
    unsigned long tx_window_errors;
28
};
29
 
30
struct interface {
31
    struct interface *next;
32
 
33
    char name[IFNAMSIZ];        /* interface name        */
34
    short type;                 /* if type               */
35
    short flags;                /* various flags         */
36
    int metric;                 /* routing metric        */
37
    int mtu;                    /* MTU value             */
38
    int tx_queue_len;           /* transmit queue length */
39
    struct ifmap map;           /* hardware setup        */
40
    struct sockaddr addr;       /* IP address            */
41
    struct sockaddr dstaddr;    /* P-P IP address        */
42
    struct sockaddr broadaddr;  /* IP broadcast address  */
43
    struct sockaddr netmask;    /* IP network mask       */
44
    struct sockaddr ipxaddr_bb; /* IPX network address   */
45
    struct sockaddr ipxaddr_sn; /* IPX network address   */
46
    struct sockaddr ipxaddr_e3; /* IPX network address   */
47
    struct sockaddr ipxaddr_e2; /* IPX network address   */
48
    struct sockaddr ddpaddr;    /* Appletalk DDP address */
49
    struct sockaddr ecaddr;     /* Econet address        */
50
    int has_ip;
51
    int has_ipx_bb;
52
    int has_ipx_sn;
53
    int has_ipx_e3;
54
    int has_ipx_e2;
55
    int has_ax25;
56
    int has_ddp;
57
    int has_econet;
58
    char hwaddr[32];            /* HW address            */
59
    int statistics_valid;
60
    struct user_net_device_stats stats;         /* statistics            */
61
    int keepalive;              /* keepalive value for SLIP */
62
    int outfill;                /* outfill value for SLIP */
63
};
64
 
65
extern int if_fetch(struct interface *ife);
66
 
67
extern int for_all_interfaces(int (*)(struct interface *, void *), void *);
68
extern struct interface *lookup_interface(char *name);
69
extern int if_readlist(void);
70
 
71
extern int do_if_fetch(struct interface *ife);
72
extern int do_if_print(struct interface *ife, void *cookie);
73
 
74
extern void ife_print(struct interface *ptr);
75
 
76
/* Defines for poor glibc2.0 users, the feature check is done at runtime */
77
#if !defined(SIOCSIFTXQLEN)
78
#define SIOCSIFTXQLEN      0x8943
79
#define SIOCGIFTXQLEN      0x8942
80
#endif
81
 
82
#if !defined(ifr_qlen)
83
/* Actually it is ifru_ivalue, but that is not present in 2.0 kernel headers */
84
#define ifr_qlen        ifr_ifru.ifru_mtu
85
#endif
86
 
87
#define HAVE_TXQUEUELEN
88
 
89
#define HAVE_DYNAMIC
90
#ifndef IFF_DYNAMIC
91
#define IFF_DYNAMIC     0x8000  /* dialup device with changing addresses */
92
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.