diff options
author | Frank Blaschka <frank.blaschka@de.ibm.com> | 2008-02-15 09:19:42 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-17 07:49:26 -0400 |
commit | 4a71df50047f0db65ea09b1be155852e81a45eba (patch) | |
tree | c1dee8950578440685da91d2553c78f0ff1fd370 /drivers/s390/net/qeth_l3.h | |
parent | 04885948b101c44cbec9dacfb49b28290a899012 (diff) | |
download | talos-obmc-linux-4a71df50047f0db65ea09b1be155852e81a45eba.tar.gz talos-obmc-linux-4a71df50047f0db65ea09b1be155852e81a45eba.zip |
qeth: new qeth device driver
List of major changes and improvements:
no manipulation of the global ARP constructor
clean code split into core, layer 2 and layer 3 functionality
better exploitation of the ethtool interface
better representation of the various hardware capabilities
fix packet socket support (tcpdump), no fake_ll required
osasnmpd notification via udev events
coding style and beautification
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
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 @@ +/* + * drivers/s390/net/qeth_l3.h + * + * Copyright IBM Corp. 2007 + * Author(s): Utz Bacher <utz.bacher@de.ibm.com>, + * Frank Pavlic <fpavlic@de.ibm.com>, + * Thomas Spatzier <tspat@de.ibm.com>, + * Frank Blaschka <frank.blaschka@de.ibm.com> + */ + +#ifndef __QETH_L3_H__ +#define __QETH_L3_H__ + +#include "qeth_core.h" + +#define QETH_DBF_TEXT_(name, level, text...) \ + do { \ + if (qeth_dbf_passes(qeth_dbf_##name, level)) { \ + char *dbf_txt_buf = get_cpu_var(qeth_l3_dbf_txt_buf); \ + sprintf(dbf_txt_buf, text); \ + debug_text_event(qeth_dbf_##name, level, dbf_txt_buf); \ + put_cpu_var(qeth_l3_dbf_txt_buf); \ + } \ + } while (0) + +DECLARE_PER_CPU(char[256], qeth_l3_dbf_txt_buf); + +struct qeth_ipaddr { + struct list_head entry; + enum qeth_ip_types type; + enum qeth_ipa_setdelip_flags set_flags; + enum qeth_ipa_setdelip_flags del_flags; + int is_multicast; + int users; + enum qeth_prot_versions proto; + unsigned char mac[OSA_ADDR_LEN]; + union { + struct { + unsigned int addr; + unsigned int mask; + } a4; + struct { + struct in6_addr addr; + unsigned int pfxlen; + } a6; + } u; +}; + +struct qeth_ipato_entry { + struct list_head entry; + enum qeth_prot_versions proto; + char addr[16]; + int mask_bits; +}; + + +void qeth_l3_ipaddr4_to_string(const __u8 *, char *); +int qeth_l3_string_to_ipaddr4(const char *, __u8 *); +void qeth_l3_ipaddr6_to_string(const __u8 *, char *); +int qeth_l3_string_to_ipaddr6(const char *, __u8 *); +void qeth_l3_ipaddr_to_string(enum qeth_prot_versions, const __u8 *, char *); +int qeth_l3_string_to_ipaddr(const char *, enum qeth_prot_versions, __u8 *); +int qeth_l3_create_device_attributes(struct device *); +void qeth_l3_remove_device_attributes(struct device *); +int qeth_l3_setrouting_v4(struct qeth_card *); +int qeth_l3_setrouting_v6(struct qeth_card *); +int qeth_l3_add_ipato_entry(struct qeth_card *, struct qeth_ipato_entry *); +void qeth_l3_del_ipato_entry(struct qeth_card *, enum qeth_prot_versions, + u8 *, int); +int qeth_l3_add_vipa(struct qeth_card *, enum qeth_prot_versions, const u8 *); +void qeth_l3_del_vipa(struct qeth_card *, enum qeth_prot_versions, const u8 *); +int qeth_l3_add_rxip(struct qeth_card *, enum qeth_prot_versions, const u8 *); +void qeth_l3_del_rxip(struct qeth_card *card, enum qeth_prot_versions, + const u8 *); + +#endif /* __QETH_L3_H__ */ |