15
* @defgroup VETHint iSeries veth devices
16
* @ingroup libhdDEVint
17
* @brief iSeries veth device functions
24
void hd_scan_veth(hd_data_t *hd_data)
31
if(!hd_probe_feature(hd_data, pr_veth)) return;
33
hd_data->module = mod_veth;
36
remove_hd_entries(hd_data);
38
PROGRESS(1, 0, "read data");
40
if((dir = opendir(PROC_ISERIES_VETH))) {
41
while((de = readdir(dir))) {
42
if(sscanf(de->d_name, "veth%u", &u) == 1) {
43
hd = add_hd_entry(hd_data, __LINE__, 0);
44
hd->base_class.id = bc_network;
46
hd->vendor.id = MAKE_ID(TAG_SPECIAL, 0x6001); // IBM
47
hd->device.id = MAKE_ID(TAG_SPECIAL, 0x1000);
48
str_printf(&hd->device.name, 0, "Virtual Ethernet card %d", hd->slot);
54
if((dir = opendir(PROC_ISERIES))) {
55
hd = add_hd_entry(hd_data, __LINE__, 0);
56
hd->base_class.id = bc_network;
58
hd->vendor.id = MAKE_ID(TAG_SPECIAL, 0x6001); // IBM
59
hd->device.id = MAKE_ID(TAG_SPECIAL, 0x1000);
60
str_printf(&hd->device.name, 0, "Virtual Ethernet card %d", hd->slot);