72
74
sysDeviceInfo[6] = 0x3E;
75
varbinds[0].oid = sysDescr;
76
varbinds[0].len_oid = sizeof(sysDescr);
77
varbinds[0].value = sysDescr;
78
varbinds[0].type = NULL_VALUE;
79
varbinds[0].len_val = 0;
81
varbinds[1].oid = sysDeviceInfo;
82
varbinds[1].len_oid = sizeof(sysDeviceInfo);
83
varbinds[1].value = sysDescr;
84
varbinds[1].len_val = 0;
85
varbinds[1].type = NULL_VALUE;
88
if (snmp(varbinds, 2, GET) <= 0) {
89
print_helperr(ERR_RET);
93
print_title(_("System Info"));
95
mvwaddstr(main_sub, 0, 0, _("Device hardware/software/name info:"));
96
for (i = 0; i < varbinds[0].len_val && *(varbinds[0].value + i); i++) {
97
mvwaddch(main_sub, 1, i + 1, *(varbinds[0].value + i));
100
if (ap_type == ATMEL410) {
102
memcpy(&ptr410, varbinds[1].value, sizeof(struct SysDeviceInfo_ATMEL410));
103
ap_sversion = ptr410.StructVersion;
104
ap_macaddr = ptr410.MacAddress;
105
ap_regdomain = swap4(ptr410.RegulationDomain);
106
ap_prodtype = ptr410.ProductType;
107
ap_oemname = ptr410.OEMName;
108
ap_oemid = ptr410.OEMID;
109
ap_prodname = ptr410.ProductName;
110
ap_hwrev = ptr410.HardwareRevision;
111
} else { /* ATMEL12350 */
113
memcpy(&ptr12350, varbinds[1].value, sizeof(struct SysDeviceInfo_ATMEL12350));
114
ap_regdomain=ptr12350.RegulationDomain;
115
ap_sversion = ptr12350.StructVersion;
116
ap_macaddr = ptr12350.MacAddress;
117
ap_prodtype = ptr12350.ProductType;
118
ap_oemname = ptr12350.OEMName;
119
ap_oemid = ptr12350.OEMID;
120
ap_prodname = ptr12350.ProductName;
121
ap_hwrev = ptr12350.HardwareRevision;
124
sprintf(message, "%s%02X%02X%02X%02X%02X%02X", MAC,
77
print_top(wait_mode == WAIT_TIMEOUT ? POLL_ON : POLL_OFF, SYSINFO);
79
if (wait_mode == WAIT_TIMEOUT)
85
varbinds[0].oid = sysDescr;
86
varbinds[0].len_oid = sizeof(sysDescr);
87
varbinds[0].value = sysDescr;
88
varbinds[0].type = NULL_VALUE;
89
varbinds[0].len_val = 0;
92
varbinds[1].oid = sysDeviceInfo;
93
varbinds[1].len_oid = sizeof(sysDeviceInfo);
94
varbinds[1].value = sysDeviceInfo;
95
varbinds[1].len_val = 0;
96
varbinds[1].type = NULL_VALUE;
99
if (ap_vendorext == VERNET) {
100
varbinds[2].oid = UpTime;
101
varbinds[2].len_oid = sizeof(UpTime);
102
varbinds[2].value = UpTime;
103
varbinds[2].len_val = 0;
104
varbinds[2].type = NULL_VALUE;
108
if (wait_mode == WAIT_FOREVER)
109
print_help(WAIT_RET);
111
if (snmp(varbinds, i, GET) <= 0) {
112
print_helperr(ERR_RET);
117
if (wait_mode == WAIT_FOREVER)
120
mvwaddstr(main_sub, 0, 0, _("Device hardware/software/name info:"));
121
for (i = 0; i < varbinds[0].len_val && *(varbinds[0].value + i); i++)
122
mvwaddch(main_sub, 1, i + 1, *(varbinds[0].value + i));
124
if (ap_type == ATMEL410) {
125
memcpy(&str410, varbinds[1].value,
126
sizeof(struct sysDeviceInfo_ATMEL410));
127
ap_sversion = str410.StructVersion;
128
ap_macaddr = str410.MacAddress;
129
ap_regdomain = swap4(str410.RegulatoryDomain);
130
ap_prodtype = str410.ProductType;
131
ap_oemname = str410.OEMName;
132
ap_oemid = str410.OEMID;
133
ap_prodname = str410.ProductName;
134
ap_hwrev = str410.HardwareRevision;
135
} else { /* ATMEL12350 */
136
memcpy(&str12350, varbinds[1].value,
137
sizeof(struct sysDeviceInfo_ATMEL12350));
138
ap_regdomain = str12350.RegulatoryDomain;
139
ap_sversion = str12350.StructVersion;
140
ap_macaddr = str12350.MacAddress;
141
ap_prodtype = str12350.ProductType;
142
ap_oemname = str12350.OEMName;
143
ap_oemid = str12350.OEMID;
144
ap_prodname = str12350.ProductName;
145
ap_hwrev = str12350.HardwareRevision;
148
sprintf(message, "%s%02X%02X%02X%02X%02X%02X", MAC,
125
149
ap_macaddr[0] & 0xFF, ap_macaddr[1] & 0xFF,
126
150
ap_macaddr[2] & 0xFF, ap_macaddr[3] & 0xFF,
127
151
ap_macaddr[4] & 0xFF, ap_macaddr[5] & 0xFF);
128
mvwaddstr(main_sub, 2, 0, message);
130
mvwaddstr(main_sub, 3, 0, _("Product name:"));
131
for (i = 0; i < 32 && ap_prodname[i]; i++) {
132
mvwaddch(main_sub, 3, i + 14, ap_prodname[i]);
135
sprintf(message, _("Product type: %u"), swap4(ap_prodtype));
136
mvwaddstr(main_sub, 4, 0, message);
138
sprintf(message, _("Hardware revision: %u"), swap4(ap_hwrev));
139
mvwaddstr(main_sub, 5, 0, message);
141
mvwaddstr(main_sub, 6, 0, _("OEM name:"));
142
for (i = 0; i < 32 && ap_oemname[i]; i++) {
143
mvwaddch(main_sub, 6, i + 10, ap_oemname[i]);
146
sprintf(message, "OEM ID: %u", swap4(ap_oemid));
147
mvwaddstr(main_sub, 7, 0, message);
149
sprintf(message, _("Regulation domain: %s [%d]"),
150
(ap_regdomain == 0x10) ? _("FCC (USA)") :
151
(ap_regdomain == 0x20) ? _("DOC (Canada)") :
152
(ap_regdomain == 0x30) ? _("ETSI (Europe)") :
153
(ap_regdomain == 0x31) ? _("Spain") :
154
(ap_regdomain == 0x32) ? _("France") :
155
(ap_regdomain == 0x40) ? _("MKK (Japan)") : _("unknown"), ap_regdomain);
156
mvwaddstr(main_sub, 8, 0, message);
158
sprintf(message, _("Info structure version: %u"), swap4(ap_sversion));
159
mvwaddstr(main_sub, 9, 0, message);
161
sprintf(message, _("Manufacturer OUI: %02X %02X %02X (%s)"),
162
ap_macaddr[0] & 0xFF, ap_macaddr[1] & 0xFF, ap_macaddr[2] & 0xFF,
163
oui2manufacturer(ap_macaddr));
164
mvwaddstr(main_sub, 10, 0, message);
152
mvwaddstr(main_sub, 2, 0, message);
154
mvwaddstr(main_sub, 3, 0, _("Product name:"));
155
for (i = 0; i < 32 && ap_prodname[i]; i++)
156
mvwaddch(main_sub, 3, i + 14, ap_prodname[i]);
158
sprintf(message, _("Product type: %u"), swap4(ap_prodtype));
159
mvwaddstr(main_sub, 4, 0, message);
161
mvwaddstr(main_sub, 5, 0, _("OEM name:"));
162
for (i = 0; i < 32 && ap_oemname[i]; i++)
163
mvwaddch(main_sub, 5, i + 10, ap_oemname[i]);
165
sprintf(message, "OEM ID: %u", swap4(ap_oemid));
166
mvwaddstr(main_sub, 6, 0, message);
168
sprintf(message, _("Hardware revision: %u"), swap4(ap_hwrev));
169
mvwaddstr(main_sub, 7, 0, message);
171
i = regdom_idx(ap_regdomain);
172
sprintf(message, "Regulatory domain: %s [%d]",
173
regdom_types[i].desc, ap_regdomain);
174
mvwaddstr(main_sub, 8, 0, message);
176
sprintf(message, _("Info structure version: %u"), swap4(ap_sversion));
177
mvwaddstr(main_sub, 9, 0, message);
179
sprintf(message, _("Manufacturer OUI: %02X %02X %02X (%s)"),
180
ap_macaddr[0] & 0xFF, ap_macaddr[1] & 0xFF, ap_macaddr[2] & 0xFF,
181
oui2manufacturer(ap_macaddr));
182
mvwaddstr(main_sub, 10, 0, message);
184
if (ap_vendorext == VERNET) {
187
if (varbinds[2].len_val > 1) {
188
for (i = 0; i < varbinds[2].len_val; i++)
189
j |= (varbinds[2].value[i]
190
<< (8 * (varbinds[2].len_val - i - 1)));
192
j = varbinds[2].value[0] & 0x80 ?
193
0xff00 | varbinds[2].value[0] : varbinds[2].value[0];
196
_("Uptime: %u days, %02u:%02u:%02u hours:mins:secs"),
197
j / 60 / 60 / 24, j / 60 / 60 % 24, j / 60 % 60, j % 60);
198
mvwaddstr(main_sub, 11, 0, message);
213
wait_mode = (wait_mode == WAIT_FOREVER ?
214
WAIT_TIMEOUT : WAIT_FOREVER);
215
print_top(wait_mode == WAIT_TIMEOUT ? POLL_ON : POLL_OFF,
219
/* either timeout for user input (i == 0) or invalid key => continue */
222
print_top(NULL, NULL);
242
293
struct in_addr ip;
243
294
varbind varbinds[OID_NUM];
244
295
size_t time_stamp;
246
for (i = 0; i < OID_NUM; i++) {
247
varbinds[i].value = oid_mac;
248
varbinds[i].type = NULL_VALUE;
249
varbinds[i].len_val = 0;
251
varbinds[0].oid = oid_mac;
252
varbinds[0].len_oid = sizeof(oid_mac);
253
varbinds[1].oid = oid_manufacturerID;
254
varbinds[1].len_oid = sizeof(oid_manufacturerID);
255
varbinds[2].oid = oid_productID;
256
varbinds[2].len_oid = sizeof(oid_productID);
257
varbinds[3].oid = oid_dot11manufacturerOUI;
258
varbinds[3].len_oid = sizeof(oid_dot11manufacturerOUI);
259
varbinds[4].oid = oid_dot11manufacturerName;
260
varbinds[4].len_oid = sizeof(oid_dot11manufacturerName);
261
varbinds[5].oid = oid_dot11manufacturerProductName;
262
varbinds[5].len_oid = sizeof(oid_dot11manufacturerProductName);
263
varbinds[6].oid = oid_dot11manufacturerProductVersion;
264
varbinds[6].len_oid = sizeof(oid_dot11manufacturerProductVersion);
265
varbinds[7].oid = oid_dot11PHYType;
266
varbinds[7].len_oid = sizeof(oid_dot11PHYType);
267
varbinds[8].oid = oid_dot11TempType;
268
varbinds[8].len_oid = sizeof(oid_dot11TempType);
269
varbinds[9].oid = oid_TxPowerLevel1;
270
varbinds[9].len_oid = sizeof(oid_TxPowerLevel1);
272
print_help(WAIT_RET);
273
if (snmp(varbinds, OID_NUM - 1, GET) <= 0) {
274
print_helperr(ERR_RET);
277
print_title(_("System Info"));
281
sprintf(message, "%s%02X%02X%02X%02X%02X%02X", MAC,
296
extern int wait_mode;
298
print_top(wait_mode == WAIT_TIMEOUT ? POLL_ON : POLL_OFF, SYSINFO);
300
if (wait_mode == WAIT_TIMEOUT)
304
for (i = 0; i < OID_NUM; i++) {
305
varbinds[i].value = oid_mac;
306
varbinds[i].type = NULL_VALUE;
307
varbinds[i].len_val = 0;
309
varbinds[0].oid = oid_mac;
310
varbinds[0].len_oid = sizeof(oid_mac);
311
varbinds[1].oid = oid_manufacturerID;
312
varbinds[1].len_oid = sizeof(oid_manufacturerID);
313
varbinds[2].oid = oid_productID;
314
varbinds[2].len_oid = sizeof(oid_productID);
315
varbinds[3].oid = oid_dot11manufacturerOUI;
316
varbinds[3].len_oid = sizeof(oid_dot11manufacturerOUI);
317
varbinds[4].oid = oid_dot11manufacturerName;
318
varbinds[4].len_oid = sizeof(oid_dot11manufacturerName);
319
varbinds[5].oid = oid_dot11manufacturerProductName;
320
varbinds[5].len_oid = sizeof(oid_dot11manufacturerProductName);
321
varbinds[6].oid = oid_dot11manufacturerProductVersion;
322
varbinds[6].len_oid = sizeof(oid_dot11manufacturerProductVersion);
323
varbinds[7].oid = oid_dot11PHYType;
324
varbinds[7].len_oid = sizeof(oid_dot11PHYType);
325
varbinds[8].oid = oid_dot11TempType;
326
varbinds[8].len_oid = sizeof(oid_dot11TempType);
327
varbinds[9].oid = oid_TxPowerLevel1;
328
varbinds[9].len_oid = sizeof(oid_TxPowerLevel1);
330
if (wait_mode == WAIT_FOREVER)
331
print_help(WAIT_RET);
333
if (snmp(varbinds, OID_NUM - 1, GET) <= 0) {
334
print_helperr(ERR_RET);
339
sprintf(message, "%s%02X%02X%02X%02X%02X%02X", MAC,
282
340
varbinds[0].value[0] & 0xFF, varbinds[0].value[1] & 0xFF,
283
341
varbinds[0].value[2] & 0xFF, varbinds[0].value[3] & 0xFF,
284
342
varbinds[0].value[4] & 0xFF, varbinds[0].value[5] & 0xFF);
285
mvwaddstr(main_sub, 0, 0, message);
287
mvwaddstr(main_sub, 3, 0, _("Manufacturer:"));
289
while (varbinds[4].len_val > i) {
290
mvwaddch(main_sub, 3, i + 20, *(varbinds[4].value + i++));
293
mvwaddstr(main_sub, 4, 0, _("Manufacturer ID:"));
295
while (varbinds[1].len_val > i) {
296
mvwaddch(main_sub, 4, i + 20, *(varbinds[1].value + i++));
299
sprintf(message, _("Manufacturer OUI: %02X %02X %02X (%s)"),
343
mvwaddstr(main_sub, 0, 0, message);
345
mvwaddstr(main_sub, 3, 0, _("Manufacturer:"));
347
while (varbinds[4].len_val > i)
348
mvwaddch(main_sub, 3, i + 20, *(varbinds[4].value + i++));
350
mvwaddstr(main_sub, 4, 0, _("Manufacturer ID:"));
352
while (varbinds[1].len_val > i)
353
mvwaddch(main_sub, 4, i + 20, *(varbinds[1].value + i++));
355
sprintf(message, _("Manufacturer OUI: %02X %02X %02X (%s)"),
300
356
varbinds[3].value[0] & 0xFF, varbinds[3].value[1] & 0xFF,
301
357
varbinds[3].value[2] & 0xFF,
302
358
oui2manufacturer(varbinds[3].value));
303
mvwaddstr(main_sub, 5, 0, message);
305
sprintf(message, _("Product Name:"));
306
mvwaddstr(main_sub, 6, 0, message);
308
while (varbinds[5].len_val > i) {
309
mvwaddch(main_sub, 6, i + 20, *(varbinds[5].value + i++));
312
sprintf(message, _("Product ID:"));
313
mvwaddstr(main_sub, 7, 0, message);
315
while (varbinds[2].len_val > i) {
316
mvwaddch(main_sub, 7, i + 20, *(varbinds[2].value + i++));
318
sprintf(message, _("Product Version:"));
319
mvwaddstr(main_sub, 8, 0, message);
321
while (varbinds[6].len_val > i) {
322
mvwaddch(main_sub, 8, i + 20, *(varbinds[6].value + i++));
326
sprintf(message, _("PHYType: %s"), types[*(varbinds[7].value) - 1]);
327
mvwaddstr(main_sub, 9, 0, message);
329
sprintf(message, _("Temperature: %s"), temp[*(varbinds[8].value) - 1]);
330
mvwaddstr(main_sub, 10, 0, message);
332
if ((i = get_RegDomain()) == 0) {
333
print_helperr(ERR_RET);
336
sprintf(message, _("Regulation Domain: %s"),
359
mvwaddstr(main_sub, 5, 0, message);
361
sprintf(message, _("Product Name:"));
362
mvwaddstr(main_sub, 6, 0, message);
364
while (varbinds[5].len_val > i)
365
mvwaddch(main_sub, 6, i + 20, *(varbinds[5].value + i++));
367
sprintf(message, _("Product ID:"));
368
mvwaddstr(main_sub, 7, 0, message);
370
while (varbinds[2].len_val > i)
371
mvwaddch(main_sub, 7, i + 20, *(varbinds[2].value + i++));
373
sprintf(message, _("Product Version:"));
374
mvwaddstr(main_sub, 8, 0, message);
376
while (varbinds[6].len_val > i)
377
mvwaddch(main_sub, 8, i + 20, *(varbinds[6].value + i++));
379
sprintf(message, _("PHYType: %s"), types[*(varbinds[7].value) - 1]);
380
mvwaddstr(main_sub, 9, 0, message);
382
sprintf(message, _("Temperature: %s"), temp[*(varbinds[8].value) - 1]);
383
mvwaddstr(main_sub, 10, 0, message);
385
if ((i = get_RegDomain()) == 0) {
386
print_helperr(ERR_RET);
390
sprintf(message, _("Regulatory Domain: %s"),
337
391
(i == 0x10) ? _("FCC (USA)") :
338
392
(i == 0x20) ? _("DOC (Canada)") :
339
393
(i == 0x30) ? _("ETSI (Europe)") :
340
394
(i == 0x31) ? _("Spain") :
341
395
(i == 0x32) ? _("France") :
342
396
(i == 0x40) ? _("MKK (Japan)") : _("unknown"));
343
mvwaddstr(main_sub, 11, 0, message);
345
sprintf(message, _("Transmit Power: %u mW"), *(varbinds[9].value));
346
mvwaddstr(main_sub, 12, 0, message);
348
varbinds[0].oid = oid_dot11PrivacyOptionImplemented;
349
varbinds[0].len_oid = sizeof(oid_dot11PrivacyOptionImplemented);
350
varbinds[0].value = oid_mac;
351
varbinds[0].type = NULL_VALUE;
352
varbinds[0].len_val = 0;
353
varbinds[1].oid = oid_dot11DiversitySupport;
354
varbinds[1].len_oid = sizeof(oid_dot11DiversitySupport);
355
varbinds[1].value = oid_mac;
356
varbinds[1].type = NULL_VALUE;
357
varbinds[1].len_val = 0;
358
varbinds[2].oid = oid_sysDescr;
359
varbinds[2].len_oid = sizeof(oid_sysDescr);
360
varbinds[2].value = oid_mac;
361
varbinds[2].type = NULL_VALUE;
362
varbinds[2].len_val = 0;
363
varbinds[3].oid = oid_sysUptime;
364
varbinds[3].len_oid = sizeof(oid_sysUptime);
365
varbinds[3].value = oid_mac;
366
varbinds[3].type = NULL_VALUE;
367
varbinds[3].len_val = 0;
369
print_help(WAIT_RET);
370
if (snmp(varbinds, 4, GET) <= 0) {
371
print_helperr(ERR_RET);
375
sprintf(message, _("WEP inplemented: %s"),
397
mvwaddstr(main_sub, 11, 0, message);
399
sprintf(message, _("Transmit Power: %u mW"), *(varbinds[9].value));
400
mvwaddstr(main_sub, 12, 0, message);
402
varbinds[0].oid = oid_dot11PrivacyOptionImplemented;
403
varbinds[0].len_oid = sizeof(oid_dot11PrivacyOptionImplemented);
404
varbinds[0].value = oid_mac;
405
varbinds[0].type = NULL_VALUE;
406
varbinds[0].len_val = 0;
407
varbinds[1].oid = oid_dot11DiversitySupport;
408
varbinds[1].len_oid = sizeof(oid_dot11DiversitySupport);
409
varbinds[1].value = oid_mac;
410
varbinds[1].type = NULL_VALUE;
411
varbinds[1].len_val = 0;
412
varbinds[2].oid = oid_sysDescr;
413
varbinds[2].len_oid = sizeof(oid_sysDescr);
414
varbinds[2].value = oid_mac;
415
varbinds[2].type = NULL_VALUE;
416
varbinds[2].len_val = 0;
417
varbinds[3].oid = oid_sysUptime;
418
varbinds[3].len_oid = sizeof(oid_sysUptime);
419
varbinds[3].value = oid_mac;
420
varbinds[3].type = NULL_VALUE;
421
varbinds[3].len_val = 0;
423
if (snmp(varbinds, 4, GET) <= 0) {
424
print_helperr(ERR_RET);
429
sprintf(message, _("WEP implemented: %s"),
376
430
(*(varbinds[0].value) == 1) ? ON : OFF);
377
mvwaddstr(main_sub, 13, 0, message);
378
sprintf(message, _("Diversity: %s"),
431
mvwaddstr(main_sub, 13, 0, message);
432
sprintf(message, _("Diversity: %s"),
379
433
diversity[*(varbinds[1].value) - 1]);
380
mvwaddstr(main_sub, 14, 0, message);
381
mvwaddstr(main_sub, LINES - 8, 0, SYS_DESCR);
383
while (varbinds[2].len_val > i && varbinds[2].value[i]) {
384
message[i] = varbinds[2].value[i];
388
mvwaddstr(main_sub, LINES - 8, strlen(SYS_DESCR) + 1, message);
393
for (c = 1; c <= varbinds[3].len_val; c++) {
395
(unsigned char) varbinds[3].value[varbinds[3].len_val - c] * i;
399
hand = time_stamp % 100;
400
time_stamp = time_stamp / 100;
401
sec = time_stamp % 60;
402
time_stamp = time_stamp / 60;
403
min = time_stamp % 60;
404
time_stamp = time_stamp / 60;
406
sprintf(message, _("Uptime: %u:%02u:%02u.%02u"), time_stamp, min, sec,
434
mvwaddstr(main_sub, 14, 0, message);
435
mvwaddstr(main_sub, LINES - 8, 0, SYS_DESCR);
437
while (varbinds[2].len_val > i && varbinds[2].value[i]) {
438
message[i] = varbinds[2].value[i];
442
mvwaddstr(main_sub, LINES - 8, strlen(SYS_DESCR) + 1, message);
447
for (c = 1; c <= varbinds[3].len_val; c++) {
449
(unsigned char) varbinds[3].value[varbinds[3].len_val - c] * i;
453
hand = time_stamp % 100;
454
time_stamp = time_stamp / 100;
455
sec = time_stamp % 60;
456
time_stamp = time_stamp / 60;
457
min = time_stamp % 60;
458
time_stamp = time_stamp / 60;
460
sprintf(message, _("Uptime: %u:%02u:%02u.%02u"), time_stamp, min, sec,
408
mvwaddstr(main_sub, 15, 0, message);
410
varbinds[0].oid = oid_ip;
411
varbinds[0].len_oid = sizeof(oid_ip);
412
varbinds[0].value = oid_mac;
413
varbinds[0].type = NULL_VALUE;
414
varbinds[0].len_val = 0;
416
print_help(WAIT_RET);
417
if (snmp(varbinds, 1, GET_NEXT) <= 0) {
418
print_helperr(ERR_RET);
462
mvwaddstr(main_sub, 15, 0, message);
464
varbinds[0].oid = oid_ip;
465
varbinds[0].len_oid = sizeof(oid_ip);
466
varbinds[0].value = oid_mac;
467
varbinds[0].type = NULL_VALUE;
468
varbinds[0].len_val = 0;
470
if (snmp(varbinds, 1, GET_NEXT) <= 0) {
471
print_helperr(ERR_RET);
476
if (wait_mode == WAIT_FOREVER)
479
memcpy(&ip.s_addr, varbinds[0].value, 4);
480
sprintf(message, _("IP Address: %s"), inet_ntoa(ip));
481
mvwaddstr(main_sub, 1, 0, message);
494
wait_mode = (wait_mode == WAIT_FOREVER ?
495
WAIT_TIMEOUT : WAIT_FOREVER);
496
print_top(wait_mode == WAIT_TIMEOUT ? POLL_ON : POLL_OFF,
500
/* either timeout for user input (i == 0) or invalid key => continue */
421
memcpy(&ip.s_addr, varbinds[0].value, 4);
422
sprintf(message, _("IP Address: %s"), inet_ntoa(ip));
423
mvwaddstr(main_sub, 1, 0, message);
503
print_top(NULL, NULL);