diff options
Diffstat (limited to 'drivers/s390/net/qeth_l3.h')
-rw-r--r-- | drivers/s390/net/qeth_l3.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_l3.h b/drivers/s390/net/qeth_l3.h new file mode 100644 index 000000000000..f639cc3af22b --- /dev/null +++ b/drivers/s390/net/qeth_l3.h | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * drivers/s390/net/qeth_l3.h | ||
3 | * | ||
4 | * Copyright IBM Corp. 2007 | ||
5 | * Author(s): Utz Bacher <utz.bacher@de.ibm.com>, | ||
6 | * Frank Pavlic <fpavlic@de.ibm.com>, | ||
7 | * Thomas Spatzier <tspat@de.ibm.com>, | ||
8 | * Frank Blaschka <frank.blaschka@de.ibm.com> | ||
9 | */ | ||
10 | |||
11 | #ifndef __QETH_L3_H__ | ||
12 | #define __QETH_L3_H__ | ||
13 | |||
14 | #include "qeth_core.h" | ||
15 | |||
16 | #define QETH_DBF_TEXT_(name, level, text...) \ | ||
17 | do { \ | ||
18 | if (qeth_dbf_passes(qeth_dbf_##name, level)) { \ | ||
19 | char *dbf_txt_buf = get_cpu_var(qeth_l3_dbf_txt_buf); \ | ||
20 | sprintf(dbf_txt_buf, text); \ | ||
21 | debug_text_event(qeth_dbf_##name, level, dbf_txt_buf); \ | ||
22 | put_cpu_var(qeth_l3_dbf_txt_buf); \ | ||
23 | } \ | ||
24 | } while (0) | ||
25 | |||
26 | DECLARE_PER_CPU(char[256], qeth_l3_dbf_txt_buf); | ||
27 | |||
28 | struct qeth_ipaddr { | ||
29 | struct list_head entry; | ||
30 | enum qeth_ip_types type; | ||
31 | enum qeth_ipa_setdelip_flags set_flags; | ||
32 | enum qeth_ipa_setdelip_flags del_flags; | ||
33 | int is_multicast; | ||
34 | int users; | ||
35 | enum qeth_prot_versions proto; | ||
36 | unsigned char mac[OSA_ADDR_LEN]; | ||
37 | union { | ||
38 | struct { | ||
39 | unsigned int addr; | ||
40 | unsigned int mask; | ||
41 | } a4; | ||
42 | struct { | ||
43 | struct in6_addr addr; | ||
44 | unsigned int pfxlen; | ||
45 | } a6; | ||
46 | } u; | ||
47 | }; | ||
48 | |||
49 | struct qeth_ipato_entry { | ||
50 | struct list_head entry; | ||
51 | enum qeth_prot_versions proto; | ||
52 | char addr[16]; | ||
53 | int mask_bits; | ||
54 | }; | ||
55 | |||
56 | |||
57 | void qeth_l3_ipaddr4_to_string(const __u8 *, char *); | ||
58 | int qeth_l3_string_to_ipaddr4(const char *, __u8 *); | ||
59 | void qeth_l3_ipaddr6_to_string(const __u8 *, char *); | ||
60 | int qeth_l3_string_to_ipaddr6(const char *, __u8 *); | ||
61 | void qeth_l3_ipaddr_to_string(enum qeth_prot_versions, const __u8 *, char *); | ||
62 | int qeth_l3_string_to_ipaddr(const char *, enum qeth_prot_versions, __u8 *); | ||
63 | int qeth_l3_create_device_attributes(struct device *); | ||
64 | void qeth_l3_remove_device_attributes(struct device *); | ||
65 | int qeth_l3_setrouting_v4(struct qeth_card *); | ||
66 | int qeth_l3_setrouting_v6(struct qeth_card *); | ||
67 | int qeth_l3_add_ipato_entry(struct qeth_card *, struct qeth_ipato_entry *); | ||
68 | void qeth_l3_del_ipato_entry(struct qeth_card *, enum qeth_prot_versions, | ||
69 | u8 *, int); | ||
70 | int qeth_l3_add_vipa(struct qeth_card *, enum qeth_prot_versions, const u8 *); | ||
71 | void qeth_l3_del_vipa(struct qeth_card *, enum qeth_prot_versions, const u8 *); | ||
72 | int qeth_l3_add_rxip(struct qeth_card *, enum qeth_prot_versions, const u8 *); | ||
73 | void qeth_l3_del_rxip(struct qeth_card *card, enum qeth_prot_versions, | ||
74 | const u8 *); | ||
75 | |||
76 | #endif /* __QETH_L3_H__ */ | ||