~mh21/ubuntu/utopic/indicator-multiload/version-0.4

« back to all changes in this revision

Viewing changes to src/netprovider.c

  • Committer: mh21 at mh21
  • Date: 2014-06-14 19:04:06 UTC
  • mfrom: (1.1.3)
  • Revision ID: mh21@mh21.de-20140614190406-tt27etcltj3oau1o
* New upstream release.
* Fixes and new features:
  - indicator-multiload segfaults immediately (LP: #942859)
  - Advanced preferences text boxes should have unit labels (LP: #1160980)
  - Change "Open System Monitor" Link (LP: #1171224)
  - Menu monitor items do not display (LP: #1251113)
  - Network graph doesn't have min scale settings (LP: #1302454)
  - Add GUI option to turn off autoranging on graphs (LP: #796398)
  - Provide monochrome option (LP: #894583)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* netprovider.c generated by valac 0.14.2, the Vala compiler
 
1
/* netprovider.c generated by valac 0.22.1, the Vala compiler
2
2
 * generated from netprovider.vala, do not modify */
3
3
 
4
4
 
6
6
#include <glib-object.h>
7
7
#include <stdlib.h>
8
8
#include <string.h>
9
 
#include <glibtop/netlist.h>
10
 
#include <glibtop/netload.h>
 
9
#include "glibtop.h"
 
10
#include "glibtop/netlist.h"
 
11
#include "glibtop/netload.h"
11
12
#include <glib/gstdio.h>
12
13
#include <float.h>
13
14
#include <math.h>
60
61
        gint lastdata_length1;
61
62
        gint _lastdata_size_;
62
63
        guint64 lasttime;
 
64
        gchar** devicefields;
 
65
        gint devicefields_length1;
 
66
        gint _devicefields_size_;
63
67
};
64
68
 
65
69
 
71
75
enum  {
72
76
        NET_PROVIDER_DUMMY_PROPERTY
73
77
};
 
78
static gchar** net_provider_fields (gchar*** devices, int* devices_length1, int* result_length1);
74
79
NetProvider* net_provider_new (void);
75
80
NetProvider* net_provider_construct (GType object_type);
76
 
Provider* provider_construct (GType object_type, const gchar* id, gchar** keys, int keys_length1);
 
81
Provider* provider_construct (GType object_type, const gchar* id, gchar** keys, int keys_length1, gchar displaytype);
 
82
static gchar** _vala_array_dup21 (gchar** self, int length);
77
83
static void net_provider_real_update (Provider* base);
 
84
gchar** provider_get_keys (Provider* self, int* result_length1);
78
85
gdouble* provider_get_values (Provider* self, int* result_length1);
79
 
static guint64* _vala_array_dup18 (guint64* self, int length);
 
86
static guint64* _vala_array_dup22 (guint64* self, int length);
80
87
static void net_provider_finalize (GObject* obj);
81
88
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
82
89
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
83
90
static gint _vala_array_length (gpointer array);
84
91
 
85
92
 
 
93
static const gchar* string_to_string (const gchar* self) {
 
94
        const gchar* result = NULL;
 
95
        g_return_val_if_fail (self != NULL, NULL);
 
96
        result = self;
 
97
        return result;
 
98
}
 
99
 
 
100
 
 
101
static gchar** net_provider_fields (gchar*** devices, int* devices_length1, int* result_length1) {
 
102
        gchar** _vala_devices = NULL;
 
103
        int _vala_devices_length1 = 0;
 
104
        gchar** result = NULL;
 
105
        glibtop_netlist netlist = {0};
 
106
        glibtop_netlist _tmp0_ = {0};
 
107
        gchar** _tmp1_ = NULL;
 
108
        gchar** _tmp2_ = NULL;
 
109
        gchar** _result_ = NULL;
 
110
        glibtop_netlist _tmp3_ = {0};
 
111
        guint32 _tmp4_ = 0U;
 
112
        gchar** _tmp5_ = NULL;
 
113
        gint _result__length1 = 0;
 
114
        gint __result__size_ = 0;
 
115
        gchar** _tmp6_ = NULL;
 
116
        gint _tmp6__length1 = 0;
 
117
        gchar* _tmp7_ = NULL;
 
118
        gchar* _tmp8_ = NULL;
 
119
        gchar** _tmp9_ = NULL;
 
120
        gint _tmp9__length1 = 0;
 
121
        gchar* _tmp10_ = NULL;
 
122
        gchar* _tmp11_ = NULL;
 
123
        gchar** _tmp12_ = NULL;
 
124
        gint _tmp12__length1 = 0;
 
125
        gchar* _tmp13_ = NULL;
 
126
        gchar* _tmp14_ = NULL;
 
127
        gchar** _tmp37_ = NULL;
 
128
        gint _tmp37__length1 = 0;
 
129
        glibtop_init ();
 
130
        _tmp2_ = _tmp1_ = glibtop_get_netlist (&_tmp0_);
 
131
        netlist = _tmp0_;
 
132
        _vala_devices = (_vala_array_free (_vala_devices, _vala_devices_length1, (GDestroyNotify) g_free), NULL);
 
133
        _vala_devices = _tmp2_;
 
134
        _vala_devices_length1 = _vala_array_length (_tmp1_);
 
135
        _tmp3_ = netlist;
 
136
        _tmp4_ = _tmp3_.number;
 
137
        _tmp5_ = g_new0 (gchar*, (3 + (2 * _tmp4_)) + 1);
 
138
        _result_ = _tmp5_;
 
139
        _result__length1 = 3 + (2 * _tmp4_);
 
140
        __result__size_ = _result__length1;
 
141
        _tmp6_ = _result_;
 
142
        _tmp6__length1 = _result__length1;
 
143
        _tmp7_ = g_strdup ("down");
 
144
        _g_free0 (_tmp6_[0]);
 
145
        _tmp6_[0] = _tmp7_;
 
146
        _tmp8_ = _tmp6_[0];
 
147
        _tmp9_ = _result_;
 
148
        _tmp9__length1 = _result__length1;
 
149
        _tmp10_ = g_strdup ("up");
 
150
        _g_free0 (_tmp9_[1]);
 
151
        _tmp9_[1] = _tmp10_;
 
152
        _tmp11_ = _tmp9_[1];
 
153
        _tmp12_ = _result_;
 
154
        _tmp12__length1 = _result__length1;
 
155
        _tmp13_ = g_strdup ("local");
 
156
        _g_free0 (_tmp12_[2]);
 
157
        _tmp12_[2] = _tmp13_;
 
158
        _tmp14_ = _tmp12_[2];
 
159
        {
 
160
                guint j = 0U;
 
161
                j = (guint) 0;
 
162
                {
 
163
                        gboolean _tmp15_ = FALSE;
 
164
                        _tmp15_ = TRUE;
 
165
                        while (TRUE) {
 
166
                                gboolean _tmp16_ = FALSE;
 
167
                                guint _tmp18_ = 0U;
 
168
                                glibtop_netlist _tmp19_ = {0};
 
169
                                guint32 _tmp20_ = 0U;
 
170
                                gchar* device = NULL;
 
171
                                gchar** _tmp21_ = NULL;
 
172
                                gint _tmp21__length1 = 0;
 
173
                                guint _tmp22_ = 0U;
 
174
                                const gchar* _tmp23_ = NULL;
 
175
                                gchar* _tmp24_ = NULL;
 
176
                                gchar** _tmp25_ = NULL;
 
177
                                gint _tmp25__length1 = 0;
 
178
                                guint _tmp26_ = 0U;
 
179
                                const gchar* _tmp27_ = NULL;
 
180
                                const gchar* _tmp28_ = NULL;
 
181
                                gchar* _tmp29_ = NULL;
 
182
                                gchar* _tmp30_ = NULL;
 
183
                                gchar** _tmp31_ = NULL;
 
184
                                gint _tmp31__length1 = 0;
 
185
                                guint _tmp32_ = 0U;
 
186
                                const gchar* _tmp33_ = NULL;
 
187
                                const gchar* _tmp34_ = NULL;
 
188
                                gchar* _tmp35_ = NULL;
 
189
                                gchar* _tmp36_ = NULL;
 
190
                                _tmp16_ = _tmp15_;
 
191
                                if (!_tmp16_) {
 
192
                                        guint _tmp17_ = 0U;
 
193
                                        _tmp17_ = j;
 
194
                                        j = _tmp17_ + 1;
 
195
                                }
 
196
                                _tmp15_ = FALSE;
 
197
                                _tmp18_ = j;
 
198
                                _tmp19_ = netlist;
 
199
                                _tmp20_ = _tmp19_.number;
 
200
                                if (!(_tmp18_ < ((guint) _tmp20_))) {
 
201
                                        break;
 
202
                                }
 
203
                                _tmp21_ = _vala_devices;
 
204
                                _tmp21__length1 = _vala_devices_length1;
 
205
                                _tmp22_ = j;
 
206
                                _tmp23_ = _tmp21_[_tmp22_];
 
207
                                _tmp24_ = g_strdup (_tmp23_);
 
208
                                device = _tmp24_;
 
209
                                _tmp25_ = _result_;
 
210
                                _tmp25__length1 = _result__length1;
 
211
                                _tmp26_ = j;
 
212
                                _tmp27_ = device;
 
213
                                _tmp28_ = string_to_string (_tmp27_);
 
214
                                _tmp29_ = g_strconcat (_tmp28_, ".down", NULL);
 
215
                                _g_free0 (_tmp25_[3 + (2 * _tmp26_)]);
 
216
                                _tmp25_[3 + (2 * _tmp26_)] = _tmp29_;
 
217
                                _tmp30_ = _tmp25_[3 + (2 * _tmp26_)];
 
218
                                _tmp31_ = _result_;
 
219
                                _tmp31__length1 = _result__length1;
 
220
                                _tmp32_ = j;
 
221
                                _tmp33_ = device;
 
222
                                _tmp34_ = string_to_string (_tmp33_);
 
223
                                _tmp35_ = g_strconcat (_tmp34_, ".up", NULL);
 
224
                                _g_free0 (_tmp31_[(3 + (2 * _tmp32_)) + 1]);
 
225
                                _tmp31_[(3 + (2 * _tmp32_)) + 1] = _tmp35_;
 
226
                                _tmp36_ = _tmp31_[(3 + (2 * _tmp32_)) + 1];
 
227
                                _g_free0 (device);
 
228
                        }
 
229
                }
 
230
        }
 
231
        _tmp37_ = _result_;
 
232
        _tmp37__length1 = _result__length1;
 
233
        if (result_length1) {
 
234
                *result_length1 = _tmp37__length1;
 
235
        }
 
236
        result = _tmp37_;
 
237
        if (devices) {
 
238
                *devices = _vala_devices;
 
239
        } else {
 
240
                _vala_devices = (_vala_array_free (_vala_devices, _vala_devices_length1, (GDestroyNotify) g_free), NULL);
 
241
        }
 
242
        if (devices_length1) {
 
243
                *devices_length1 = _vala_devices_length1;
 
244
        }
 
245
        return result;
 
246
}
 
247
 
 
248
 
 
249
static gchar** _vala_array_dup21 (gchar** self, int length) {
 
250
        gchar** result;
 
251
        int i;
 
252
        result = g_new0 (gchar*, length + 1);
 
253
        for (i = 0; i < length; i++) {
 
254
                gchar* _tmp0_ = NULL;
 
255
                _tmp0_ = g_strdup (self[i]);
 
256
                result[i] = _tmp0_;
 
257
        }
 
258
        return result;
 
259
}
 
260
 
 
261
 
86
262
NetProvider* net_provider_construct (GType object_type) {
87
263
        NetProvider * self = NULL;
88
 
        gchar* _tmp0_;
89
 
        gchar* _tmp1_;
90
 
        gchar* _tmp2_;
 
264
        gchar** devices = NULL;
 
265
        gint devices_length1 = 0;
 
266
        gint _devices_size_ = 0;
 
267
        gchar** _tmp0_ = NULL;
 
268
        gint _tmp1_ = 0;
 
269
        gint _tmp2_ = 0;
91
270
        gchar** _tmp3_ = NULL;
92
 
        gchar** _tmp4_;
93
 
        gint _tmp4__length1;
94
 
        _tmp0_ = g_strdup ("down");
95
 
        _tmp1_ = g_strdup ("up");
96
 
        _tmp2_ = g_strdup ("local");
97
 
        _tmp3_ = g_new0 (gchar*, 3 + 1);
98
 
        _tmp3_[0] = _tmp0_;
99
 
        _tmp3_[1] = _tmp1_;
100
 
        _tmp3_[2] = _tmp2_;
 
271
        gchar** _tmp4_ = NULL;
 
272
        gint _tmp4__length1 = 0;
 
273
        gchar** _tmp5_ = NULL;
 
274
        gint _tmp5__length1 = 0;
 
275
        _tmp3_ = net_provider_fields (&_tmp0_, &_tmp1_, &_tmp2_);
 
276
        devices = (_vala_array_free (devices, devices_length1, (GDestroyNotify) g_free), NULL);
 
277
        devices = _tmp0_;
 
278
        devices_length1 = _tmp1_;
 
279
        _devices_size_ = devices_length1;
101
280
        _tmp4_ = _tmp3_;
102
 
        _tmp4__length1 = 3;
103
 
        self = (NetProvider*) provider_construct (object_type, "net", _tmp4_, 3);
 
281
        _tmp4__length1 = _tmp2_;
 
282
        self = (NetProvider*) provider_construct (object_type, "net", _tmp4_, _tmp2_, 's');
104
283
        _tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
 
284
        _tmp5_ = (devices != NULL) ? _vala_array_dup21 (devices, devices_length1) : ((gpointer) devices);
 
285
        _tmp5__length1 = devices_length1;
 
286
        self->priv->devicefields = (_vala_array_free (self->priv->devicefields, self->priv->devicefields_length1, (GDestroyNotify) g_free), NULL);
 
287
        self->priv->devicefields = _tmp5_;
 
288
        self->priv->devicefields_length1 = _tmp5__length1;
 
289
        self->priv->_devicefields_size_ = self->priv->devicefields_length1;
 
290
        devices = (_vala_array_free (devices, devices_length1, (GDestroyNotify) g_free), NULL);
105
291
        return self;
106
292
}
107
293
 
111
297
}
112
298
 
113
299
 
114
 
static guint64* _vala_array_dup18 (guint64* self, int length) {
 
300
static guint64* _vala_array_dup22 (guint64* self, int length) {
115
301
        return g_memdup (self, length * sizeof (guint64));
116
302
}
117
303
 
118
304
 
119
305
static void net_provider_real_update (Provider* base) {
120
306
        NetProvider * self;
121
 
        guint64* _tmp0_ = NULL;
122
 
        guint64* newdata;
123
 
        gint newdata_length1;
124
 
        gint _newdata_size_;
125
 
        guint64 _tmp1_ = 0ULL;
126
 
        guint64 newtime;
 
307
        guint64* newdata = NULL;
 
308
        gchar** _tmp0_ = NULL;
 
309
        gint _tmp0__length1 = 0;
 
310
        gchar** _tmp1_ = NULL;
 
311
        gint _tmp1__length1 = 0;
 
312
        guint64* _tmp2_ = NULL;
 
313
        gint newdata_length1 = 0;
 
314
        gint _newdata_size_ = 0;
 
315
        guint64 newtime = 0ULL;
 
316
        guint64 _tmp3_ = 0ULL;
 
317
        glibtop_netlist netlist = {0};
127
318
        gchar** devices = NULL;
 
319
        glibtop_netlist _tmp4_ = {0};
 
320
        gchar** _tmp5_ = NULL;
 
321
        gchar** _tmp6_ = NULL;
128
322
        gint devices_length1 = 0;
129
323
        gint _devices_size_ = 0;
130
 
        glibtop_netlist netlist = {0};
131
 
        glibtop_netlist _tmp2_ = {0};
132
 
        gchar** _tmp3_;
133
 
        gchar** _tmp4_ = NULL;
134
 
        glibtop_netlist _tmp5_;
135
 
        guint32 _tmp6_;
136
 
        guint64* _tmp89_;
137
 
        gint _tmp89__length1;
138
 
        guint64* _tmp110_;
139
 
        gint _tmp110__length1;
140
 
        guint64* _tmp111_;
141
 
        gint _tmp111__length1;
142
 
        guint64 _tmp112_;
143
 
        self = NET_PROVIDER (base);
144
 
        _tmp0_ = g_new0 (guint64, 3);
145
 
        newdata = _tmp0_;
146
 
        newdata_length1 = 3;
 
324
        glibtop_netlist _tmp7_ = {0};
 
325
        guint32 _tmp8_ = 0U;
 
326
        guint64* _tmp163_ = NULL;
 
327
        gint _tmp163__length1 = 0;
 
328
        guint64* _tmp184_ = NULL;
 
329
        gint _tmp184__length1 = 0;
 
330
        guint64* _tmp185_ = NULL;
 
331
        gint _tmp185__length1 = 0;
 
332
        guint64 _tmp186_ = 0ULL;
 
333
        self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_NET_PROVIDER, NetProvider);
 
334
        _tmp0_ = provider_get_keys (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PROVIDER, Provider), &_tmp0__length1);
 
335
        _tmp1_ = _tmp0_;
 
336
        _tmp1__length1 = _tmp0__length1;
 
337
        _tmp2_ = g_new0 (guint64, _tmp1__length1);
 
338
        newdata = _tmp2_;
 
339
        newdata_length1 = _tmp1__length1;
147
340
        _newdata_size_ = newdata_length1;
148
 
        _tmp1_ = g_get_monotonic_time ();
149
 
        newtime = _tmp1_;
150
 
        _tmp4_ = _tmp3_ = glibtop_get_netlist (&_tmp2_);
151
 
        netlist = _tmp2_;
152
 
        devices = (_vala_array_free (devices, devices_length1, (GDestroyNotify) g_free), NULL);
153
 
        devices = _tmp4_;
154
 
        devices_length1 = _vala_array_length (_tmp3_);
 
341
        _tmp3_ = g_get_monotonic_time ();
 
342
        newtime = _tmp3_;
 
343
        _tmp6_ = _tmp5_ = glibtop_get_netlist (&_tmp4_);
 
344
        netlist = _tmp4_;
 
345
        devices = _tmp6_;
 
346
        devices_length1 = _vala_array_length (_tmp5_);
155
347
        _devices_size_ = devices_length1;
156
 
        _tmp5_ = netlist;
157
 
        _tmp6_ = _tmp5_.number;
158
 
        g_debug ("netprovider.vala:34: Netlist: %u entries", (guint) _tmp6_);
 
348
        _tmp7_ = netlist;
 
349
        _tmp8_ = _tmp7_.number;
 
350
        g_debug ("netprovider.vala:54: Netlist: %u entries", (guint) _tmp8_);
159
351
        {
160
 
                guint i;
 
352
                guint i = 0U;
161
353
                i = (guint) 0;
162
354
                {
163
 
                        gboolean _tmp7_;
164
 
                        _tmp7_ = TRUE;
 
355
                        gboolean _tmp9_ = FALSE;
 
356
                        _tmp9_ = TRUE;
165
357
                        while (TRUE) {
166
 
                                gboolean _tmp8_;
167
 
                                guint _tmp10_;
168
 
                                glibtop_netlist _tmp11_;
169
 
                                guint32 _tmp12_;
 
358
                                gboolean _tmp10_ = FALSE;
 
359
                                guint _tmp12_ = 0U;
 
360
                                glibtop_netlist _tmp13_ = {0};
 
361
                                guint32 _tmp14_ = 0U;
 
362
                                gchar* device = NULL;
 
363
                                gchar** _tmp15_ = NULL;
 
364
                                gint _tmp15__length1 = 0;
 
365
                                guint _tmp16_ = 0U;
 
366
                                const gchar* _tmp17_ = NULL;
 
367
                                gchar* _tmp18_ = NULL;
170
368
                                glibtop_netload netload = {0};
171
 
                                gchar** _tmp13_;
172
 
                                gint _tmp13__length1;
173
 
                                guint _tmp14_;
174
 
                                const gchar* _tmp15_;
175
 
                                glibtop_netload _tmp16_ = {0};
176
 
                                gchar** _tmp17_;
177
 
                                gint _tmp17__length1;
178
 
                                guint _tmp18_;
179
 
                                const gchar* _tmp19_;
180
 
                                glibtop_netload _tmp20_;
181
 
                                guint64 _tmp21_;
182
 
                                glibtop_netload _tmp22_;
183
 
                                guint64 _tmp23_;
184
 
                                glibtop_netload _tmp24_;
185
 
                                guint32 _tmp25_;
186
 
                                glibtop_netload _tmp26_;
187
 
                                guint32 _tmp27_;
188
 
                                glibtop_netload _tmp28_;
189
 
                                guint32 _tmp29_;
190
 
                                glibtop_netload _tmp30_;
191
 
                                guint64 _tmp31_;
192
 
                                glibtop_netload _tmp32_;
193
 
                                guint64 _tmp33_;
194
 
                                glibtop_netload _tmp34_;
195
 
                                guint64 _tmp35_;
196
 
                                glibtop_netload _tmp36_;
197
 
                                guint64 _tmp37_;
198
 
                                glibtop_netload _tmp38_;
199
 
                                guint64 _tmp39_;
200
 
                                glibtop_netload _tmp40_;
201
 
                                guint64 _tmp41_;
202
 
                                glibtop_netload _tmp42_;
203
 
                                guint64 _tmp43_;
204
 
                                glibtop_netload _tmp44_;
205
 
                                guint64 _tmp45_;
206
 
                                glibtop_netload _tmp46_;
207
 
                                guint64 _tmp47_;
208
 
                                glibtop_netload _tmp48_;
209
 
                                guint64 _tmp49_;
210
 
                                glibtop_netload _tmp50_;
211
 
                                guint64 _tmp51_;
212
 
                                gint _tmp52_;
213
 
                                glibtop_netload _tmp53_;
214
 
                                guint64 _tmp54_;
215
 
                                gint _tmp55_;
216
 
                                _tmp8_ = _tmp7_;
217
 
                                if (!_tmp8_) {
218
 
                                        guint _tmp9_;
219
 
                                        _tmp9_ = i;
220
 
                                        i = _tmp9_ + 1;
 
369
                                const gchar* _tmp19_ = NULL;
 
370
                                glibtop_netload _tmp20_ = {0};
 
371
                                const gchar* _tmp21_ = NULL;
 
372
                                gchar* _tmp22_ = NULL;
 
373
                                gchar* _tmp23_ = NULL;
 
374
                                glibtop_netload _tmp24_ = {0};
 
375
                                guint64 _tmp25_ = 0ULL;
 
376
                                glibtop_netload _tmp26_ = {0};
 
377
                                guint64 _tmp27_ = 0ULL;
 
378
                                glibtop_netload _tmp28_ = {0};
 
379
                                guint32 _tmp29_ = 0U;
 
380
                                gchar* _tmp30_ = NULL;
 
381
                                gchar* _tmp31_ = NULL;
 
382
                                gchar* _tmp32_ = NULL;
 
383
                                gchar* _tmp33_ = NULL;
 
384
                                glibtop_netload _tmp34_ = {0};
 
385
                                guint32 _tmp35_ = 0U;
 
386
                                gchar* _tmp36_ = NULL;
 
387
                                gchar* _tmp37_ = NULL;
 
388
                                gchar* _tmp38_ = NULL;
 
389
                                gchar* _tmp39_ = NULL;
 
390
                                glibtop_netload _tmp40_ = {0};
 
391
                                guint32 _tmp41_ = 0U;
 
392
                                gchar* _tmp42_ = NULL;
 
393
                                gchar* _tmp43_ = NULL;
 
394
                                gchar* _tmp44_ = NULL;
 
395
                                gchar* _tmp45_ = NULL;
 
396
                                glibtop_netload _tmp46_ = {0};
 
397
                                guint64 _tmp47_ = 0ULL;
 
398
                                gchar* _tmp48_ = NULL;
 
399
                                gchar* _tmp49_ = NULL;
 
400
                                gchar* _tmp50_ = NULL;
 
401
                                gchar* _tmp51_ = NULL;
 
402
                                glibtop_netload _tmp52_ = {0};
 
403
                                guint64 _tmp53_ = 0ULL;
 
404
                                gchar* _tmp54_ = NULL;
 
405
                                gchar* _tmp55_ = NULL;
 
406
                                gchar* _tmp56_ = NULL;
 
407
                                gchar* _tmp57_ = NULL;
 
408
                                glibtop_netload _tmp58_ = {0};
 
409
                                guint64 _tmp59_ = 0ULL;
 
410
                                gchar* _tmp60_ = NULL;
 
411
                                gchar* _tmp61_ = NULL;
 
412
                                gchar* _tmp62_ = NULL;
 
413
                                gchar* _tmp63_ = NULL;
 
414
                                glibtop_netload _tmp64_ = {0};
 
415
                                guint64 _tmp65_ = 0ULL;
 
416
                                gchar* _tmp66_ = NULL;
 
417
                                gchar* _tmp67_ = NULL;
 
418
                                gchar* _tmp68_ = NULL;
 
419
                                gchar* _tmp69_ = NULL;
 
420
                                glibtop_netload _tmp70_ = {0};
 
421
                                guint64 _tmp71_ = 0ULL;
 
422
                                gchar* _tmp72_ = NULL;
 
423
                                gchar* _tmp73_ = NULL;
 
424
                                gchar* _tmp74_ = NULL;
 
425
                                gchar* _tmp75_ = NULL;
 
426
                                glibtop_netload _tmp76_ = {0};
 
427
                                guint64 _tmp77_ = 0ULL;
 
428
                                gchar* _tmp78_ = NULL;
 
429
                                gchar* _tmp79_ = NULL;
 
430
                                gchar* _tmp80_ = NULL;
 
431
                                gchar* _tmp81_ = NULL;
 
432
                                glibtop_netload _tmp82_ = {0};
 
433
                                guint64 _tmp83_ = 0ULL;
 
434
                                gchar* _tmp84_ = NULL;
 
435
                                gchar* _tmp85_ = NULL;
 
436
                                gchar* _tmp86_ = NULL;
 
437
                                gchar* _tmp87_ = NULL;
 
438
                                glibtop_netload _tmp88_ = {0};
 
439
                                guint64 _tmp89_ = 0ULL;
 
440
                                gchar* _tmp90_ = NULL;
 
441
                                gchar* _tmp91_ = NULL;
 
442
                                gchar* _tmp92_ = NULL;
 
443
                                gchar* _tmp93_ = NULL;
 
444
                                glibtop_netload _tmp94_ = {0};
 
445
                                guint64 _tmp95_ = 0ULL;
 
446
                                gchar* _tmp96_ = NULL;
 
447
                                gchar* _tmp97_ = NULL;
 
448
                                gchar* _tmp98_ = NULL;
 
449
                                gchar* _tmp99_ = NULL;
 
450
                                glibtop_netload _tmp100_ = {0};
 
451
                                guint64 _tmp101_ = 0ULL;
 
452
                                gchar* _tmp102_ = NULL;
 
453
                                gchar* _tmp103_ = NULL;
 
454
                                gchar* _tmp104_ = NULL;
 
455
                                gchar* _tmp105_ = NULL;
 
456
                                glibtop_netload _tmp106_ = {0};
 
457
                                guint64 _tmp107_ = 0ULL;
 
458
                                gint _tmp108_ = 0;
 
459
                                glibtop_netload _tmp109_ = {0};
 
460
                                guint64 _tmp110_ = 0ULL;
 
461
                                gint _tmp111_ = 0;
 
462
                                _tmp10_ = _tmp9_;
 
463
                                if (!_tmp10_) {
 
464
                                        guint _tmp11_ = 0U;
 
465
                                        _tmp11_ = i;
 
466
                                        i = _tmp11_ + 1;
221
467
                                }
222
 
                                _tmp7_ = FALSE;
223
 
                                _tmp10_ = i;
224
 
                                _tmp11_ = netlist;
225
 
                                _tmp12_ = _tmp11_.number;
226
 
                                if (!(_tmp10_ < ((guint) _tmp12_))) {
 
468
                                _tmp9_ = FALSE;
 
469
                                _tmp12_ = i;
 
470
                                _tmp13_ = netlist;
 
471
                                _tmp14_ = _tmp13_.number;
 
472
                                if (!(_tmp12_ < ((guint) _tmp14_))) {
227
473
                                        break;
228
474
                                }
229
 
                                _tmp13_ = devices;
230
 
                                _tmp13__length1 = devices_length1;
231
 
                                _tmp14_ = i;
232
 
                                _tmp15_ = _tmp13_[_tmp14_];
233
 
                                glibtop_get_netload (&_tmp16_, _tmp15_);
234
 
                                netload = _tmp16_;
235
 
                                _tmp17_ = devices;
236
 
                                _tmp17__length1 = devices_length1;
237
 
                                _tmp18_ = i;
238
 
                                _tmp19_ = _tmp17_[_tmp18_];
239
 
                                g_debug ("netprovider.vala:38: Netload: %s", _tmp19_);
240
 
                                _tmp20_ = netload;
241
 
                                _tmp21_ = _tmp20_.flags;
242
 
                                g_debug ("netprovider.vala:39:   flags: %llx", _tmp21_);
243
 
                                _tmp22_ = netload;
244
 
                                _tmp23_ = _tmp22_.if_flags;
245
 
                                g_debug ("netprovider.vala:40:   if flags: %llx", _tmp23_);
 
475
                                _tmp15_ = devices;
 
476
                                _tmp15__length1 = devices_length1;
 
477
                                _tmp16_ = i;
 
478
                                _tmp17_ = _tmp15_[_tmp16_];
 
479
                                _tmp18_ = g_strdup (_tmp17_);
 
480
                                device = _tmp18_;
 
481
                                _tmp19_ = device;
 
482
                                glibtop_get_netload (&_tmp20_, _tmp19_);
 
483
                                netload = _tmp20_;
 
484
                                _tmp21_ = device;
 
485
                                _tmp22_ = g_strconcat ("Netload: ", _tmp21_, NULL);
 
486
                                _tmp23_ = _tmp22_;
 
487
                                g_debug ("netprovider.vala:59: %s", _tmp23_);
 
488
                                _g_free0 (_tmp23_);
246
489
                                _tmp24_ = netload;
247
 
                                _tmp25_ = _tmp24_.mtu;
248
 
                                g_debug ("netprovider.vala:41:   mtu: %u", (guint) _tmp25_);
 
490
                                _tmp25_ = _tmp24_.flags;
 
491
                                g_debug ("netprovider.vala:60:   flags: %x", (guint) ((guint32) _tmp25_));
249
492
                                _tmp26_ = netload;
250
 
                                _tmp27_ = _tmp26_.subnet;
251
 
                                g_debug ("netprovider.vala:42:   subnet: %u", (guint) _tmp27_);
 
493
                                _tmp27_ = _tmp26_.if_flags;
 
494
                                g_debug ("netprovider.vala:61:   if flags: %x", (guint) ((guint32) _tmp27_));
252
495
                                _tmp28_ = netload;
253
 
                                _tmp29_ = _tmp28_.address;
254
 
                                g_debug ("netprovider.vala:43:   address: %u", (guint) _tmp29_);
255
 
                                _tmp30_ = netload;
256
 
                                _tmp31_ = _tmp30_.packets_in;
257
 
                                g_debug ("netprovider.vala:44:   packets in: %llu", _tmp31_);
258
 
                                _tmp32_ = netload;
259
 
                                _tmp33_ = _tmp32_.packets_out;
260
 
                                g_debug ("netprovider.vala:45:   packets out: %llu", _tmp33_);
 
496
                                _tmp29_ = _tmp28_.mtu;
 
497
                                _tmp30_ = g_strdup_printf ("%u", _tmp29_);
 
498
                                _tmp31_ = _tmp30_;
 
499
                                _tmp32_ = g_strconcat ("  mtu: ", _tmp31_, NULL);
 
500
                                _tmp33_ = _tmp32_;
 
501
                                g_debug ("netprovider.vala:62: %s", _tmp33_);
 
502
                                _g_free0 (_tmp33_);
 
503
                                _g_free0 (_tmp31_);
261
504
                                _tmp34_ = netload;
262
 
                                _tmp35_ = _tmp34_.packets_total;
263
 
                                g_debug ("netprovider.vala:46:   packets total: %llu", _tmp35_);
264
 
                                _tmp36_ = netload;
265
 
                                _tmp37_ = _tmp36_.bytes_in;
266
 
                                g_debug ("netprovider.vala:47:   bytes in: %llu", _tmp37_);
267
 
                                _tmp38_ = netload;
268
 
                                _tmp39_ = _tmp38_.bytes_out;
269
 
                                g_debug ("netprovider.vala:48:   bytes out: %llu", _tmp39_);
 
505
                                _tmp35_ = _tmp34_.subnet;
 
506
                                _tmp36_ = g_strdup_printf ("%u", _tmp35_);
 
507
                                _tmp37_ = _tmp36_;
 
508
                                _tmp38_ = g_strconcat ("  subnet: ", _tmp37_, NULL);
 
509
                                _tmp39_ = _tmp38_;
 
510
                                g_debug ("netprovider.vala:63: %s", _tmp39_);
 
511
                                _g_free0 (_tmp39_);
 
512
                                _g_free0 (_tmp37_);
270
513
                                _tmp40_ = netload;
271
 
                                _tmp41_ = _tmp40_.bytes_total;
272
 
                                g_debug ("netprovider.vala:49:   bytes total: %llu", _tmp41_);
273
 
                                _tmp42_ = netload;
274
 
                                _tmp43_ = _tmp42_.errors_in;
275
 
                                g_debug ("netprovider.vala:50:   errors in: %llu", _tmp43_);
276
 
                                _tmp44_ = netload;
277
 
                                _tmp45_ = _tmp44_.errors_out;
278
 
                                g_debug ("netprovider.vala:51:   errors out: %llu", _tmp45_);
 
514
                                _tmp41_ = _tmp40_.address;
 
515
                                _tmp42_ = g_strdup_printf ("%u", _tmp41_);
 
516
                                _tmp43_ = _tmp42_;
 
517
                                _tmp44_ = g_strconcat ("  address: ", _tmp43_, NULL);
 
518
                                _tmp45_ = _tmp44_;
 
519
                                g_debug ("netprovider.vala:64: %s", _tmp45_);
 
520
                                _g_free0 (_tmp45_);
 
521
                                _g_free0 (_tmp43_);
279
522
                                _tmp46_ = netload;
280
 
                                _tmp47_ = _tmp46_.errors_total;
281
 
                                g_debug ("netprovider.vala:52:   errors total: %llu", _tmp47_);
282
 
                                _tmp48_ = netload;
283
 
                                _tmp49_ = _tmp48_.collisions;
284
 
                                g_debug ("netprovider.vala:53:   collisions: %llu", _tmp49_);
285
 
                                _tmp50_ = netload;
286
 
                                _tmp51_ = _tmp50_.if_flags;
287
 
                                _tmp52_ = GLIBTOP_IF_FLAGS_UP;
288
 
                                _tmp53_ = netload;
289
 
                                _tmp54_ = _tmp53_.if_flags;
290
 
                                _tmp55_ = GLIBTOP_IF_FLAGS_RUNNING;
291
 
                                if (((_tmp51_ & (1L << _tmp52_)) == ((guint64) 0)) | ((_tmp54_ & (1L << _tmp55_)) == ((guint64) 0))) {
292
 
                                        g_debug ("netprovider.vala:57:   down or not running");
 
523
                                _tmp47_ = _tmp46_.packets_in;
 
524
                                _tmp48_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp47_);
 
525
                                _tmp49_ = _tmp48_;
 
526
                                _tmp50_ = g_strconcat ("  packets in: ", _tmp49_, NULL);
 
527
                                _tmp51_ = _tmp50_;
 
528
                                g_debug ("netprovider.vala:65: %s", _tmp51_);
 
529
                                _g_free0 (_tmp51_);
 
530
                                _g_free0 (_tmp49_);
 
531
                                _tmp52_ = netload;
 
532
                                _tmp53_ = _tmp52_.packets_out;
 
533
                                _tmp54_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp53_);
 
534
                                _tmp55_ = _tmp54_;
 
535
                                _tmp56_ = g_strconcat ("  packets out: ", _tmp55_, NULL);
 
536
                                _tmp57_ = _tmp56_;
 
537
                                g_debug ("netprovider.vala:66: %s", _tmp57_);
 
538
                                _g_free0 (_tmp57_);
 
539
                                _g_free0 (_tmp55_);
 
540
                                _tmp58_ = netload;
 
541
                                _tmp59_ = _tmp58_.packets_total;
 
542
                                _tmp60_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp59_);
 
543
                                _tmp61_ = _tmp60_;
 
544
                                _tmp62_ = g_strconcat ("  packets total: ", _tmp61_, NULL);
 
545
                                _tmp63_ = _tmp62_;
 
546
                                g_debug ("netprovider.vala:67: %s", _tmp63_);
 
547
                                _g_free0 (_tmp63_);
 
548
                                _g_free0 (_tmp61_);
 
549
                                _tmp64_ = netload;
 
550
                                _tmp65_ = _tmp64_.bytes_in;
 
551
                                _tmp66_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp65_);
 
552
                                _tmp67_ = _tmp66_;
 
553
                                _tmp68_ = g_strconcat ("  bytes in: ", _tmp67_, NULL);
 
554
                                _tmp69_ = _tmp68_;
 
555
                                g_debug ("netprovider.vala:68: %s", _tmp69_);
 
556
                                _g_free0 (_tmp69_);
 
557
                                _g_free0 (_tmp67_);
 
558
                                _tmp70_ = netload;
 
559
                                _tmp71_ = _tmp70_.bytes_out;
 
560
                                _tmp72_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp71_);
 
561
                                _tmp73_ = _tmp72_;
 
562
                                _tmp74_ = g_strconcat ("  bytes out: ", _tmp73_, NULL);
 
563
                                _tmp75_ = _tmp74_;
 
564
                                g_debug ("netprovider.vala:69: %s", _tmp75_);
 
565
                                _g_free0 (_tmp75_);
 
566
                                _g_free0 (_tmp73_);
 
567
                                _tmp76_ = netload;
 
568
                                _tmp77_ = _tmp76_.bytes_total;
 
569
                                _tmp78_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp77_);
 
570
                                _tmp79_ = _tmp78_;
 
571
                                _tmp80_ = g_strconcat ("  bytes total: ", _tmp79_, NULL);
 
572
                                _tmp81_ = _tmp80_;
 
573
                                g_debug ("netprovider.vala:70: %s", _tmp81_);
 
574
                                _g_free0 (_tmp81_);
 
575
                                _g_free0 (_tmp79_);
 
576
                                _tmp82_ = netload;
 
577
                                _tmp83_ = _tmp82_.errors_in;
 
578
                                _tmp84_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp83_);
 
579
                                _tmp85_ = _tmp84_;
 
580
                                _tmp86_ = g_strconcat ("  errors in: ", _tmp85_, NULL);
 
581
                                _tmp87_ = _tmp86_;
 
582
                                g_debug ("netprovider.vala:71: %s", _tmp87_);
 
583
                                _g_free0 (_tmp87_);
 
584
                                _g_free0 (_tmp85_);
 
585
                                _tmp88_ = netload;
 
586
                                _tmp89_ = _tmp88_.errors_out;
 
587
                                _tmp90_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp89_);
 
588
                                _tmp91_ = _tmp90_;
 
589
                                _tmp92_ = g_strconcat ("  errors out: ", _tmp91_, NULL);
 
590
                                _tmp93_ = _tmp92_;
 
591
                                g_debug ("netprovider.vala:72: %s", _tmp93_);
 
592
                                _g_free0 (_tmp93_);
 
593
                                _g_free0 (_tmp91_);
 
594
                                _tmp94_ = netload;
 
595
                                _tmp95_ = _tmp94_.errors_total;
 
596
                                _tmp96_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp95_);
 
597
                                _tmp97_ = _tmp96_;
 
598
                                _tmp98_ = g_strconcat ("  errors total: ", _tmp97_, NULL);
 
599
                                _tmp99_ = _tmp98_;
 
600
                                g_debug ("netprovider.vala:73: %s", _tmp99_);
 
601
                                _g_free0 (_tmp99_);
 
602
                                _g_free0 (_tmp97_);
 
603
                                _tmp100_ = netload;
 
604
                                _tmp101_ = _tmp100_.collisions;
 
605
                                _tmp102_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp101_);
 
606
                                _tmp103_ = _tmp102_;
 
607
                                _tmp104_ = g_strconcat ("  collisions: ", _tmp103_, NULL);
 
608
                                _tmp105_ = _tmp104_;
 
609
                                g_debug ("netprovider.vala:74: %s", _tmp105_);
 
610
                                _g_free0 (_tmp105_);
 
611
                                _g_free0 (_tmp103_);
 
612
                                _tmp106_ = netload;
 
613
                                _tmp107_ = _tmp106_.if_flags;
 
614
                                _tmp108_ = GLIBTOP_IF_FLAGS_UP;
 
615
                                _tmp109_ = netload;
 
616
                                _tmp110_ = _tmp109_.if_flags;
 
617
                                _tmp111_ = GLIBTOP_IF_FLAGS_RUNNING;
 
618
                                if (((_tmp107_ & (1L << _tmp108_)) == ((guint64) 0)) | ((_tmp110_ & (1L << _tmp111_)) == ((guint64) 0))) {
 
619
                                        g_debug ("netprovider.vala:78:   down or not running");
293
620
                                } else {
294
 
                                        gchar** _tmp56_;
295
 
                                        gint _tmp56__length1;
296
 
                                        guint _tmp57_;
297
 
                                        const gchar* _tmp58_;
298
 
                                        gchar* _tmp59_ = NULL;
299
 
                                        gchar* _tmp60_;
300
 
                                        gboolean _tmp61_ = FALSE;
301
 
                                        gboolean _tmp62_;
302
 
                                        _tmp56_ = devices;
303
 
                                        _tmp56__length1 = devices_length1;
304
 
                                        _tmp57_ = i;
305
 
                                        _tmp58_ = _tmp56_[_tmp57_];
306
 
                                        _tmp59_ = g_strdup_printf ("/sys/class/net/%s/device", _tmp58_);
307
 
                                        _tmp60_ = _tmp59_;
308
 
                                        _tmp61_ = g_file_test (_tmp60_, G_FILE_TEST_EXISTS);
309
 
                                        _tmp62_ = _tmp61_;
310
 
                                        _g_free0 (_tmp60_);
311
 
                                        if (_tmp62_) {
312
 
                                                guint64* _tmp63_;
313
 
                                                gint _tmp63__length1;
314
 
                                                glibtop_netload _tmp64_;
315
 
                                                guint64 _tmp65_;
316
 
                                                guint64 _tmp66_;
317
 
                                                guint64* _tmp67_;
318
 
                                                gint _tmp67__length1;
319
 
                                                glibtop_netload _tmp68_;
320
 
                                                guint64 _tmp69_;
321
 
                                                guint64 _tmp70_;
322
 
                                                _tmp63_ = newdata;
323
 
                                                _tmp63__length1 = newdata_length1;
324
 
                                                _tmp64_ = netload;
325
 
                                                _tmp65_ = _tmp64_.bytes_in;
326
 
                                                _tmp63_[0] += _tmp65_;
327
 
                                                _tmp66_ = _tmp63_[0];
328
 
                                                _tmp67_ = newdata;
329
 
                                                _tmp67__length1 = newdata_length1;
330
 
                                                _tmp68_ = netload;
331
 
                                                _tmp69_ = _tmp68_.bytes_out;
332
 
                                                _tmp67_[1] += _tmp69_;
333
 
                                                _tmp70_ = _tmp67_[1];
334
 
                                                g_debug ("netprovider.vala:61:   existing device link");
 
621
                                        const gchar* _tmp112_ = NULL;
 
622
                                        gchar* _tmp113_ = NULL;
 
623
                                        gchar* _tmp114_ = NULL;
 
624
                                        gboolean _tmp115_ = FALSE;
 
625
                                        gboolean _tmp116_ = FALSE;
 
626
                                        _tmp112_ = device;
 
627
                                        _tmp113_ = g_strdup_printf ("/sys/class/net/%s/device", _tmp112_);
 
628
                                        _tmp114_ = _tmp113_;
 
629
                                        _tmp115_ = g_file_test (_tmp114_, G_FILE_TEST_EXISTS);
 
630
                                        _tmp116_ = _tmp115_;
 
631
                                        _g_free0 (_tmp114_);
 
632
                                        if (_tmp116_) {
 
633
                                                guint64* _tmp117_ = NULL;
 
634
                                                gint _tmp117__length1 = 0;
 
635
                                                glibtop_netload _tmp118_ = {0};
 
636
                                                guint64 _tmp119_ = 0ULL;
 
637
                                                guint64 _tmp120_ = 0ULL;
 
638
                                                guint64* _tmp121_ = NULL;
 
639
                                                gint _tmp121__length1 = 0;
 
640
                                                glibtop_netload _tmp122_ = {0};
 
641
                                                guint64 _tmp123_ = 0ULL;
 
642
                                                guint64 _tmp124_ = 0ULL;
 
643
                                                _tmp117_ = newdata;
 
644
                                                _tmp117__length1 = newdata_length1;
 
645
                                                _tmp118_ = netload;
 
646
                                                _tmp119_ = _tmp118_.bytes_in;
 
647
                                                _tmp117_[0] += _tmp119_;
 
648
                                                _tmp120_ = _tmp117_[0];
 
649
                                                _tmp121_ = newdata;
 
650
                                                _tmp121__length1 = newdata_length1;
 
651
                                                _tmp122_ = netload;
 
652
                                                _tmp123_ = _tmp122_.bytes_out;
 
653
                                                _tmp121_[1] += _tmp123_;
 
654
                                                _tmp124_ = _tmp121_[1];
 
655
                                                g_debug ("netprovider.vala:82:   existing device link");
335
656
                                        } else {
336
 
                                                glibtop_netload _tmp71_;
337
 
                                                guint64 _tmp72_;
338
 
                                                gint _tmp73_;
339
 
                                                _tmp71_ = netload;
340
 
                                                _tmp72_ = _tmp71_.if_flags;
341
 
                                                _tmp73_ = GLIBTOP_IF_FLAGS_POINTOPOINT;
342
 
                                                if ((_tmp72_ & (1L << _tmp73_)) > ((guint64) 0)) {
343
 
                                                        guint64* _tmp74_;
344
 
                                                        gint _tmp74__length1;
345
 
                                                        glibtop_netload _tmp75_;
346
 
                                                        guint64 _tmp76_;
347
 
                                                        guint64 _tmp77_;
348
 
                                                        guint64* _tmp78_;
349
 
                                                        gint _tmp78__length1;
350
 
                                                        glibtop_netload _tmp79_;
351
 
                                                        guint64 _tmp80_;
352
 
                                                        guint64 _tmp81_;
353
 
                                                        _tmp74_ = newdata;
354
 
                                                        _tmp74__length1 = newdata_length1;
355
 
                                                        _tmp75_ = netload;
356
 
                                                        _tmp76_ = _tmp75_.bytes_in;
357
 
                                                        _tmp74_[0] += _tmp76_;
358
 
                                                        _tmp77_ = _tmp74_[0];
359
 
                                                        _tmp78_ = newdata;
360
 
                                                        _tmp78__length1 = newdata_length1;
361
 
                                                        _tmp79_ = netload;
362
 
                                                        _tmp80_ = _tmp79_.bytes_out;
363
 
                                                        _tmp78_[1] += _tmp80_;
364
 
                                                        _tmp81_ = _tmp78_[1];
365
 
                                                        g_debug ("netprovider.vala:65:   pointtopoint");
 
657
                                                glibtop_netload _tmp125_ = {0};
 
658
                                                guint64 _tmp126_ = 0ULL;
 
659
                                                gint _tmp127_ = 0;
 
660
                                                _tmp125_ = netload;
 
661
                                                _tmp126_ = _tmp125_.if_flags;
 
662
                                                _tmp127_ = GLIBTOP_IF_FLAGS_POINTOPOINT;
 
663
                                                if ((_tmp126_ & (1L << _tmp127_)) > ((guint64) 0)) {
 
664
                                                        guint64* _tmp128_ = NULL;
 
665
                                                        gint _tmp128__length1 = 0;
 
666
                                                        glibtop_netload _tmp129_ = {0};
 
667
                                                        guint64 _tmp130_ = 0ULL;
 
668
                                                        guint64 _tmp131_ = 0ULL;
 
669
                                                        guint64* _tmp132_ = NULL;
 
670
                                                        gint _tmp132__length1 = 0;
 
671
                                                        glibtop_netload _tmp133_ = {0};
 
672
                                                        guint64 _tmp134_ = 0ULL;
 
673
                                                        guint64 _tmp135_ = 0ULL;
 
674
                                                        _tmp128_ = newdata;
 
675
                                                        _tmp128__length1 = newdata_length1;
 
676
                                                        _tmp129_ = netload;
 
677
                                                        _tmp130_ = _tmp129_.bytes_in;
 
678
                                                        _tmp128_[0] += _tmp130_;
 
679
                                                        _tmp131_ = _tmp128_[0];
 
680
                                                        _tmp132_ = newdata;
 
681
                                                        _tmp132__length1 = newdata_length1;
 
682
                                                        _tmp133_ = netload;
 
683
                                                        _tmp134_ = _tmp133_.bytes_out;
 
684
                                                        _tmp132_[1] += _tmp134_;
 
685
                                                        _tmp135_ = _tmp132_[1];
 
686
                                                        g_debug ("netprovider.vala:86:   pointtopoint");
366
687
                                                } else {
367
 
                                                        glibtop_netload _tmp82_;
368
 
                                                        guint64 _tmp83_;
369
 
                                                        gint _tmp84_;
370
 
                                                        _tmp82_ = netload;
371
 
                                                        _tmp83_ = _tmp82_.if_flags;
372
 
                                                        _tmp84_ = GLIBTOP_IF_FLAGS_LOOPBACK;
373
 
                                                        if ((_tmp83_ & (1L << _tmp84_)) > ((guint64) 0)) {
374
 
                                                                guint64* _tmp85_;
375
 
                                                                gint _tmp85__length1;
376
 
                                                                glibtop_netload _tmp86_;
377
 
                                                                guint64 _tmp87_;
378
 
                                                                guint64 _tmp88_;
379
 
                                                                _tmp85_ = newdata;
380
 
                                                                _tmp85__length1 = newdata_length1;
381
 
                                                                _tmp86_ = netload;
382
 
                                                                _tmp87_ = _tmp86_.bytes_in;
383
 
                                                                _tmp85_[2] += _tmp87_;
384
 
                                                                _tmp88_ = _tmp85_[2];
385
 
                                                                g_debug ("netprovider.vala:68:   loopback");
 
688
                                                        glibtop_netload _tmp136_ = {0};
 
689
                                                        guint64 _tmp137_ = 0ULL;
 
690
                                                        gint _tmp138_ = 0;
 
691
                                                        _tmp136_ = netload;
 
692
                                                        _tmp137_ = _tmp136_.if_flags;
 
693
                                                        _tmp138_ = GLIBTOP_IF_FLAGS_LOOPBACK;
 
694
                                                        if ((_tmp137_ & (1L << _tmp138_)) > ((guint64) 0)) {
 
695
                                                                guint64* _tmp139_ = NULL;
 
696
                                                                gint _tmp139__length1 = 0;
 
697
                                                                glibtop_netload _tmp140_ = {0};
 
698
                                                                guint64 _tmp141_ = 0ULL;
 
699
                                                                guint64 _tmp142_ = 0ULL;
 
700
                                                                _tmp139_ = newdata;
 
701
                                                                _tmp139__length1 = newdata_length1;
 
702
                                                                _tmp140_ = netload;
 
703
                                                                _tmp141_ = _tmp140_.bytes_in;
 
704
                                                                _tmp139_[2] += _tmp141_;
 
705
                                                                _tmp142_ = _tmp139_[2];
 
706
                                                                g_debug ("netprovider.vala:89:   loopback");
386
707
                                                        } else {
387
 
                                                                g_debug ("netprovider.vala:70:   unknown");
388
 
                                                        }
389
 
                                                }
390
 
                                        }
391
 
                                }
 
708
                                                                g_debug ("netprovider.vala:91:   unknown");
 
709
                                                        }
 
710
                                                }
 
711
                                        }
 
712
                                }
 
713
                                {
 
714
                                        guint j = 0U;
 
715
                                        guint isize = 0U;
 
716
                                        gchar** _tmp143_ = NULL;
 
717
                                        gint _tmp143__length1 = 0;
 
718
                                        j = (guint) 0;
 
719
                                        _tmp143_ = self->priv->devicefields;
 
720
                                        _tmp143__length1 = self->priv->devicefields_length1;
 
721
                                        isize = (guint) _tmp143__length1;
 
722
                                        {
 
723
                                                gboolean _tmp144_ = FALSE;
 
724
                                                _tmp144_ = TRUE;
 
725
                                                while (TRUE) {
 
726
                                                        gboolean _tmp145_ = FALSE;
 
727
                                                        guint _tmp147_ = 0U;
 
728
                                                        guint _tmp148_ = 0U;
 
729
                                                        gchar** _tmp149_ = NULL;
 
730
                                                        gint _tmp149__length1 = 0;
 
731
                                                        guint _tmp150_ = 0U;
 
732
                                                        const gchar* _tmp151_ = NULL;
 
733
                                                        const gchar* _tmp152_ = NULL;
 
734
                                                        _tmp145_ = _tmp144_;
 
735
                                                        if (!_tmp145_) {
 
736
                                                                guint _tmp146_ = 0U;
 
737
                                                                _tmp146_ = j;
 
738
                                                                j = _tmp146_ + 1;
 
739
                                                        }
 
740
                                                        _tmp144_ = FALSE;
 
741
                                                        _tmp147_ = j;
 
742
                                                        _tmp148_ = isize;
 
743
                                                        if (!(_tmp147_ < _tmp148_)) {
 
744
                                                                break;
 
745
                                                        }
 
746
                                                        _tmp149_ = self->priv->devicefields;
 
747
                                                        _tmp149__length1 = self->priv->devicefields_length1;
 
748
                                                        _tmp150_ = j;
 
749
                                                        _tmp151_ = _tmp149_[_tmp150_];
 
750
                                                        _tmp152_ = device;
 
751
                                                        if (g_strcmp0 (_tmp151_, _tmp152_) == 0) {
 
752
                                                                guint64* _tmp153_ = NULL;
 
753
                                                                gint _tmp153__length1 = 0;
 
754
                                                                guint _tmp154_ = 0U;
 
755
                                                                glibtop_netload _tmp155_ = {0};
 
756
                                                                guint64 _tmp156_ = 0ULL;
 
757
                                                                guint64 _tmp157_ = 0ULL;
 
758
                                                                guint64* _tmp158_ = NULL;
 
759
                                                                gint _tmp158__length1 = 0;
 
760
                                                                guint _tmp159_ = 0U;
 
761
                                                                glibtop_netload _tmp160_ = {0};
 
762
                                                                guint64 _tmp161_ = 0ULL;
 
763
                                                                guint64 _tmp162_ = 0ULL;
 
764
                                                                _tmp153_ = newdata;
 
765
                                                                _tmp153__length1 = newdata_length1;
 
766
                                                                _tmp154_ = j;
 
767
                                                                _tmp155_ = netload;
 
768
                                                                _tmp156_ = _tmp155_.bytes_in;
 
769
                                                                _tmp153_[3 + (_tmp154_ * 2)] = _tmp156_;
 
770
                                                                _tmp157_ = _tmp153_[3 + (_tmp154_ * 2)];
 
771
                                                                _tmp158_ = newdata;
 
772
                                                                _tmp158__length1 = newdata_length1;
 
773
                                                                _tmp159_ = j;
 
774
                                                                _tmp160_ = netload;
 
775
                                                                _tmp161_ = _tmp160_.bytes_out;
 
776
                                                                _tmp158_[(3 + (_tmp159_ * 2)) + 1] = _tmp161_;
 
777
                                                                _tmp162_ = _tmp158_[(3 + (_tmp159_ * 2)) + 1];
 
778
                                                                break;
 
779
                                                        }
 
780
                                                }
 
781
                                        }
 
782
                                }
 
783
                                _g_free0 (device);
392
784
                        }
393
785
                }
394
786
        }
395
 
        _tmp89_ = self->priv->lastdata;
396
 
        _tmp89__length1 = self->priv->lastdata_length1;
397
 
        if (_tmp89__length1 != 0) {
398
 
                guint64 _tmp90_;
399
 
                guint64 _tmp91_;
400
 
                gdouble delta;
401
 
                _tmp90_ = newtime;
402
 
                _tmp91_ = self->priv->lasttime;
403
 
                delta = (_tmp90_ - _tmp91_) / 1e6;
 
787
        _tmp163_ = self->priv->lastdata;
 
788
        _tmp163__length1 = self->priv->lastdata_length1;
 
789
        if (_tmp163__length1 != 0) {
 
790
                gdouble delta = 0.0;
 
791
                guint64 _tmp164_ = 0ULL;
 
792
                guint64 _tmp165_ = 0ULL;
 
793
                _tmp164_ = newtime;
 
794
                _tmp165_ = self->priv->lasttime;
 
795
                delta = (_tmp164_ - _tmp165_) / 1e6;
404
796
                {
405
 
                        guint i;
406
 
                        gdouble* _tmp92_;
407
 
                        gint _tmp92__length1;
408
 
                        gdouble* _tmp93_;
409
 
                        gint _tmp93__length1;
410
 
                        guint isize;
 
797
                        guint i = 0U;
 
798
                        guint isize = 0U;
 
799
                        gdouble* _tmp166_ = NULL;
 
800
                        gint _tmp166__length1 = 0;
 
801
                        gdouble* _tmp167_ = NULL;
 
802
                        gint _tmp167__length1 = 0;
411
803
                        i = (guint) 0;
412
 
                        _tmp92_ = provider_get_values (PROVIDER (self), &_tmp92__length1);
413
 
                        _tmp93_ = _tmp92_;
414
 
                        _tmp93__length1 = _tmp92__length1;
415
 
                        isize = (guint) _tmp93__length1;
 
804
                        _tmp166_ = provider_get_values (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PROVIDER, Provider), &_tmp166__length1);
 
805
                        _tmp167_ = _tmp166_;
 
806
                        _tmp167__length1 = _tmp166__length1;
 
807
                        isize = (guint) _tmp167__length1;
416
808
                        {
417
 
                                gboolean _tmp94_;
418
 
                                _tmp94_ = TRUE;
 
809
                                gboolean _tmp168_ = FALSE;
 
810
                                _tmp168_ = TRUE;
419
811
                                while (TRUE) {
420
 
                                        gboolean _tmp95_;
421
 
                                        guint _tmp97_;
422
 
                                        guint _tmp98_;
423
 
                                        gdouble* _tmp99_;
424
 
                                        gint _tmp99__length1;
425
 
                                        gdouble* _tmp100_;
426
 
                                        gint _tmp100__length1;
427
 
                                        guint _tmp101_;
428
 
                                        guint64* _tmp102_;
429
 
                                        gint _tmp102__length1;
430
 
                                        guint _tmp103_;
431
 
                                        guint64 _tmp104_;
432
 
                                        guint64* _tmp105_;
433
 
                                        gint _tmp105__length1;
434
 
                                        guint _tmp106_;
435
 
                                        guint64 _tmp107_;
436
 
                                        gdouble _tmp108_;
437
 
                                        gdouble _tmp109_;
438
 
                                        _tmp95_ = _tmp94_;
439
 
                                        if (!_tmp95_) {
440
 
                                                guint _tmp96_;
441
 
                                                _tmp96_ = i;
442
 
                                                i = _tmp96_ + 1;
 
812
                                        gboolean _tmp169_ = FALSE;
 
813
                                        guint _tmp171_ = 0U;
 
814
                                        guint _tmp172_ = 0U;
 
815
                                        gdouble* _tmp173_ = NULL;
 
816
                                        gint _tmp173__length1 = 0;
 
817
                                        gdouble* _tmp174_ = NULL;
 
818
                                        gint _tmp174__length1 = 0;
 
819
                                        guint _tmp175_ = 0U;
 
820
                                        guint64* _tmp176_ = NULL;
 
821
                                        gint _tmp176__length1 = 0;
 
822
                                        guint _tmp177_ = 0U;
 
823
                                        guint64 _tmp178_ = 0ULL;
 
824
                                        guint64* _tmp179_ = NULL;
 
825
                                        gint _tmp179__length1 = 0;
 
826
                                        guint _tmp180_ = 0U;
 
827
                                        guint64 _tmp181_ = 0ULL;
 
828
                                        gdouble _tmp182_ = 0.0;
 
829
                                        gdouble _tmp183_ = 0.0;
 
830
                                        _tmp169_ = _tmp168_;
 
831
                                        if (!_tmp169_) {
 
832
                                                guint _tmp170_ = 0U;
 
833
                                                _tmp170_ = i;
 
834
                                                i = _tmp170_ + 1;
443
835
                                        }
444
 
                                        _tmp94_ = FALSE;
445
 
                                        _tmp97_ = i;
446
 
                                        _tmp98_ = isize;
447
 
                                        if (!(_tmp97_ < _tmp98_)) {
 
836
                                        _tmp168_ = FALSE;
 
837
                                        _tmp171_ = i;
 
838
                                        _tmp172_ = isize;
 
839
                                        if (!(_tmp171_ < _tmp172_)) {
448
840
                                                break;
449
841
                                        }
450
 
                                        _tmp99_ = provider_get_values (PROVIDER (self), &_tmp99__length1);
451
 
                                        _tmp100_ = _tmp99_;
452
 
                                        _tmp100__length1 = _tmp99__length1;
453
 
                                        _tmp101_ = i;
454
 
                                        _tmp102_ = newdata;
455
 
                                        _tmp102__length1 = newdata_length1;
456
 
                                        _tmp103_ = i;
457
 
                                        _tmp104_ = _tmp102_[_tmp103_];
458
 
                                        _tmp105_ = self->priv->lastdata;
459
 
                                        _tmp105__length1 = self->priv->lastdata_length1;
460
 
                                        _tmp106_ = i;
461
 
                                        _tmp107_ = _tmp105_[_tmp106_];
462
 
                                        _tmp108_ = delta;
463
 
                                        _tmp100_[_tmp101_] = (_tmp104_ - _tmp107_) / _tmp108_;
464
 
                                        _tmp109_ = _tmp100_[_tmp101_];
 
842
                                        _tmp173_ = provider_get_values (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PROVIDER, Provider), &_tmp173__length1);
 
843
                                        _tmp174_ = _tmp173_;
 
844
                                        _tmp174__length1 = _tmp173__length1;
 
845
                                        _tmp175_ = i;
 
846
                                        _tmp176_ = newdata;
 
847
                                        _tmp176__length1 = newdata_length1;
 
848
                                        _tmp177_ = i;
 
849
                                        _tmp178_ = _tmp176_[_tmp177_];
 
850
                                        _tmp179_ = self->priv->lastdata;
 
851
                                        _tmp179__length1 = self->priv->lastdata_length1;
 
852
                                        _tmp180_ = i;
 
853
                                        _tmp181_ = _tmp179_[_tmp180_];
 
854
                                        _tmp182_ = delta;
 
855
                                        _tmp174_[_tmp175_] = (_tmp178_ - _tmp181_) / _tmp182_;
 
856
                                        _tmp183_ = _tmp174_[_tmp175_];
465
857
                                }
466
858
                        }
467
859
                }
468
860
        }
469
 
        _tmp110_ = newdata;
470
 
        _tmp110__length1 = newdata_length1;
471
 
        _tmp111_ = (_tmp110_ != NULL) ? _vala_array_dup18 (_tmp110_, _tmp110__length1) : ((gpointer) _tmp110_);
472
 
        _tmp111__length1 = _tmp110__length1;
 
861
        _tmp184_ = newdata;
 
862
        _tmp184__length1 = newdata_length1;
 
863
        _tmp185_ = (_tmp184_ != NULL) ? _vala_array_dup22 (_tmp184_, _tmp184__length1) : ((gpointer) _tmp184_);
 
864
        _tmp185__length1 = _tmp184__length1;
473
865
        self->priv->lastdata = (g_free (self->priv->lastdata), NULL);
474
 
        self->priv->lastdata = _tmp111_;
475
 
        self->priv->lastdata_length1 = _tmp111__length1;
 
866
        self->priv->lastdata = _tmp185_;
 
867
        self->priv->lastdata_length1 = _tmp185__length1;
476
868
        self->priv->_lastdata_size_ = self->priv->lastdata_length1;
477
 
        _tmp112_ = newtime;
478
 
        self->priv->lasttime = _tmp112_;
 
869
        _tmp186_ = newtime;
 
870
        self->priv->lasttime = _tmp186_;
479
871
        devices = (_vala_array_free (devices, devices_length1, (GDestroyNotify) g_free), NULL);
480
872
        newdata = (g_free (newdata), NULL);
481
873
}
496
888
 
497
889
static void net_provider_finalize (GObject* obj) {
498
890
        NetProvider * self;
499
 
        self = NET_PROVIDER (obj);
 
891
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NET_PROVIDER, NetProvider);
500
892
        self->priv->lastdata = (g_free (self->priv->lastdata), NULL);
 
893
        self->priv->devicefields = (_vala_array_free (self->priv->devicefields, self->priv->devicefields_length1, (GDestroyNotify) g_free), NULL);
501
894
        G_OBJECT_CLASS (net_provider_parent_class)->finalize (obj);
502
895
}
503
896
 
504
897
 
505
898
/******************************************************************************
506
 
 * Copyright (C) 2011  Michael Hofmann <mh21@piware.de>                       *
 
899
 * Copyright (C) 2011-2013  Michael Hofmann <mh21@mh21.de>                    *
507
900
 *                                                                            *
508
901
 * This program is free software; you can redistribute it and/or modify       *
509
902
 * it under the terms of the GNU General Public License as published by       *