Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
qeth_l3.h
Go to the documentation of this file.
1 /*
2  * Copyright IBM Corp. 2007
3  * Author(s): Utz Bacher <[email protected]>,
4  * Frank Pavlic <[email protected]>,
5  * Thomas Spatzier <[email protected]>,
6  * Frank Blaschka <[email protected]>
7  */
8 
9 #ifndef __QETH_L3_H__
10 #define __QETH_L3_H__
11 
12 #include "qeth_core.h"
13 
14 #define QETH_SNIFF_AVAIL 0x0008
15 
16 struct qeth_ipaddr {
17  struct list_head entry;
22  int users;
24  unsigned char mac[OSA_ADDR_LEN];
25  union {
26  struct {
27  unsigned int addr;
28  unsigned int mask;
29  } a4;
30  struct {
31  struct in6_addr addr;
32  unsigned int pfxlen;
33  } a6;
34  } u;
35 };
36 
38  struct list_head entry;
40  char addr[16];
41  int mask_bits;
42 };
43 
44 
45 void qeth_l3_ipaddr4_to_string(const __u8 *, char *);
46 int qeth_l3_string_to_ipaddr4(const char *, __u8 *);
47 void qeth_l3_ipaddr6_to_string(const __u8 *, char *);
48 int qeth_l3_string_to_ipaddr6(const char *, __u8 *);
49 void qeth_l3_ipaddr_to_string(enum qeth_prot_versions, const __u8 *, char *);
50 int qeth_l3_string_to_ipaddr(const char *, enum qeth_prot_versions, __u8 *);
53 int qeth_l3_setrouting_v4(struct qeth_card *);
54 int qeth_l3_setrouting_v6(struct qeth_card *);
55 int qeth_l3_add_ipato_entry(struct qeth_card *, struct qeth_ipato_entry *);
57  u8 *, int);
58 int qeth_l3_add_vipa(struct qeth_card *, enum qeth_prot_versions, const u8 *);
59 void qeth_l3_del_vipa(struct qeth_card *, enum qeth_prot_versions, const u8 *);
60 int qeth_l3_add_rxip(struct qeth_card *, enum qeth_prot_versions, const u8 *);
62  const u8 *);
65 int qeth_l3_add_ip(struct qeth_card *, struct qeth_ipaddr *);
66 int qeth_l3_delete_ip(struct qeth_card *, struct qeth_ipaddr *);
67 void qeth_l3_set_ip_addr_list(struct qeth_card *);
68 
69 #endif /* __QETH_L3_H__ */