File: nic.h

package info (click to toggle)
s390-tools 2.40.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,288 kB
  • sloc: ansic: 187,079; sh: 12,157; cpp: 5,049; makefile: 2,812; perl: 2,541; asm: 1,097; python: 697; xml: 29
file content (42 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * zdev - Modify and display the persistent configuration of devices
 *
 * Copyright IBM Corp. 2016, 2017
 *
 * s390-tools is free software; you can redistribute it and/or modify
 * it under the terms of the MIT license. See LICENSE for details.
 */

#ifndef NIC_H
#define NIC_H

#include <stdbool.h>

enum nic_type {
	nic_qdio,
	nic_hipers,
	nic_iedn,
	nic_inmn,
};

enum nic_target {
	nic_vswitch,
	nic_lan,
};

#define NIC_OWNER_SIZE	9
#define NIC_NAME_SIZE	9

struct nic_data {
	enum nic_type type;
	enum nic_target target;
	char owner[NIC_OWNER_SIZE];
	char name[NIC_NAME_SIZE];
};

bool nic_data_get(const char *, struct nic_data *);
void nic_data_print(struct nic_data *, int);
bool nic_vswitch_get_layer2(const char *, int *);
bool nic_lan_get_layer2(const char *, const char *, int *);

#endif /* NIC_H */