Enabling multithreaded compilation.
[debian/lxpanel.git] / src / plugins / netstat / netstat.h
CommitLineData
f8c25730
DB
1#ifndef HAVE_FNETDAEMON_H
2#define HAVE_FNETDAEMON_H
3
4#include <stdio.h>
5#include <netinet/in.h>
6#include <gtk/gtk.h>
7#include "wireless.h"
8
9#define NETDEV_STAT_NORMAL 0
10#define NETDEV_STAT_PROBLEM 1
11#define NETDEV_STAT_RENEW 2
12#define NETDEV_STAT_BOTHRS 3
13#define NETDEV_STAT_SENDDATA 4
14#define NETDEV_STAT_RECVDATA 5
15
16/* forward declaration for UI interaction. */
17struct statusicon;
18
19struct pgui {
20 GtkWidget *dlg;
21 GtkWidget *pentry;
22};
23
24typedef struct {
25 char *ifname;
26 char *mac;
27 char *ipaddr;
28 char *dest;
29 char *bcast;
30 char *mask;
31 int flags;
32 gboolean alive;
33 gboolean enable;
34 gboolean updated;
35 gboolean plug;
36 gboolean connected;
37
38 /* wireless */
39 gboolean wireless;
40 char *protocol;
41 char *essid;
42 int quality;
43 struct pgui *pg;
44
45 int status;
46 gulong recv_bytes;
47 gulong recv_packets;
48 gulong trans_bytes;
49 gulong trans_packets;
50
51 /* systray */
52 struct statusicon *status_icon;
53} netdevice;
54
55typedef struct netdevice_node {
56 netdevice info;
57 struct netdevice_node *prev;
58 struct netdevice_node *next;
59} NETDEVLIST;
60typedef NETDEVLIST *NETDEVLIST_PTR;
61
62typedef struct {
63 int dev_count;
64 int sockfd;
65 int iwsockfd;
66 GIOChannel *lxnmchannel;
67 FILE *netdev_fp;
68 NETDEVLIST_PTR netdevlist;
69} FNETD;
70
71typedef struct {
72 GtkWidget *mainw;
73 FNETD *fnetd;
74 char *fixcmd;
75 gint ttag;
76} netstat;
77
78typedef struct {
79 netstat *ns;
80 NETDEVLIST_PTR netdev_list;
81} netdev_info;
82
83typedef struct {
84 netdev_info *ni;
85 GIOChannel *gio;
86 ap_info *apinfo;
87 char *ifname;
88} ap_setting;
89
90#endif