-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
117 lines (99 loc) · 4.61 KB
/
INSTALL
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Copyright (C) 2008 Tadeus Prastowo (eus at member dot fsf dot org)
1. Check out the complete source tree.
2. Copy ``pwd`/include/linux/*.h' and ``pwd`/include/net/*.h' to
`/lib/modules/`uname -r`/build/include/linux/' and
`/lib/modules/`uname -r`/build/include/net/', respectively.
3. Add `#define AF_ATN 29' and `#define PF_ATN AF_ATN' to
`/lib/modules/`uname -r`/build/include/linux/socket.h' and
`/usr/include/bits/socket.h', respectively, as follows:
For Linux kernel in /lib/modules/`uname -r`/build/include/linux/socket.h:
-------------------------------------------------------------------------
/* Supported address families. */
...
#define AF_WANPIPE 25 /* Wanpipe API Sockets */
#define AF_LLC 26 /* Linux LLC */
#define AF_ATN 29 /* ATN TP4/CLNP Networking Suite */
#define AF_TIPC 30 /* TIPC sockets */
#define AF_BLUETOOTH 31 /* Bluetooth sockets */
...
/* Protocol families, same as address families. */
...
#define PF_WANPIPE AF_WANPIPE
#define PF_LLC AF_LLC
#define PF_ATN AF_ATN
#define PF_TIPC AF_TIPC
#define PF_BLUETOOTH AF_BLUETOOTH
...
For GNU C library in /usr/include/bits/socket.h:
------------------------------------------------
/* Protocol families. */
...
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
#define PF_ATN 29 /* ATN TP4/CLNP Networking Suite */
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
...
/* Address families. */
...
#define AF_WANPIPE PF_WANPIPE
#define AF_ATN PF_ATN
#define AF_BLUETOOTH PF_BLUETOOTH
...
4. Add a directory named `netatn' in /usr/include/.
Copy the following data to a file named `atn.h' put in the directory.
================================== Copy Here ==================================
/*
* ATN An implementation of the ATN TP4/CLNP protocol suite for
* the GNU/Linux operating system. ATN is implemented using the
* BSD Socket interface as the means of communication with
* the user level.
*
* PF_ATN protocol family socket handler.
*
* Authors: Tadeus Prastowo <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*/
#ifndef __NETATN_ATN_H
#define __NETATN_ATN_H 1
#include <features.h> /* for the glibc version number */
#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
#include <net/ethernet.h> /* the L2 protocols */
#else
#include <linux/if_ether.h> /* the L2 protocols */
#endif
#define NSAP_ADDR_LEN 20
struct atn_addr {
unsigned char s_addr[NSAP_ADDR_LEN];
};
struct sockaddr_atn {
sa_family_t satn_family;
struct atn_addr satn_addr;
unsigned char satn_mac_addr[ETH_ALEN];
};
#endif /* netatn/atn.h */
================================== Copy Here ==================================
5. Make sure you are in the directory containing the source code.
Execute `make' to build `atn.ko'.
You can opt to execute `make modules_install' instead so that the resulting
`atn.ko' will be put in your system.
Later, execute `make clean' to clean up every generated files.
6. Make sure that `register_8022_client' and `unregister_8022_client' symbols
can be found in your Linux kernel. To do so, execute:
`cat /proc/kallsyms | grep register_8022_client'. If those two symbols are
returned, you can continue to the next step. Otherwise, you have to build one
of the following Linux kernel components either as a module or built-in into
the kernel. If it has already been built as a module, make sure that it has
been inserted into the running kernel with either `modprobe' or `insmod':
Networking -> Networking options -> 802.1d Ethernet Bridging
Networking -> Networking options -> ANSI/IEEE 802.2 LLC type 2 Support
Networking -> Networking options -> The IPX protocol
Networking -> Networking options -> Appletalk protocol support
Device drivers -> Network device support -> Token Ring devices
-> Token Ring driver support
7. Make sure you are in the directory containing the source code.
If you executed `make modules_install', execute `modprobe atn.ko' to insert
the module. Otherwise, execute `insmod atn.ko'.
Later, execute `rmmod atn' to remove the module.