mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
appletalk: move the protocol out of tree
AppleTalk has been removed in MacOS X 10.6 (Snow Leopard), in 2009, according to Wikipedia. We recently got a burst of AI generated fixes to this protocol which nobody is reviewing. Let AppleTalk follow AX.25 and hamradio out of the Linux tree. We we will maintain the code at: github.com/linux-netdev/mod-orphan for anyone interested in playing with it. Retain the uAPI for now. No strong reason, simply because I suspect keeping it will be less controversial. Acked-by: Stephen Hemminger <stephen@networkplumber.org> Link: https://patch.msgid.link/20260615222935.947233-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -475,51 +475,7 @@ Please see: Documentation/networking/ip-sysctl.rst and
|
||||
Documentation/admin-guide/sysctl/net.rst for descriptions of these entries.
|
||||
|
||||
|
||||
4. Appletalk
|
||||
------------
|
||||
|
||||
The /proc/sys/net/appletalk directory holds the Appletalk configuration data
|
||||
when Appletalk is loaded. The configurable parameters are:
|
||||
|
||||
aarp-expiry-time
|
||||
----------------
|
||||
|
||||
The amount of time we keep an ARP entry before expiring it. Used to age out
|
||||
old hosts.
|
||||
|
||||
aarp-resolve-time
|
||||
-----------------
|
||||
|
||||
The amount of time we will spend trying to resolve an Appletalk address.
|
||||
|
||||
aarp-retransmit-limit
|
||||
---------------------
|
||||
|
||||
The number of times we will retransmit a query before giving up.
|
||||
|
||||
aarp-tick-time
|
||||
--------------
|
||||
|
||||
Controls the rate at which expires are checked.
|
||||
|
||||
The directory /proc/net/appletalk holds the list of active Appletalk sockets
|
||||
on a machine.
|
||||
|
||||
The fields indicate the DDP type, the local address (in network:node format)
|
||||
the remote address, the size of the transmit pending queue, the size of the
|
||||
received queue (bytes waiting for applications to read) the state and the uid
|
||||
owning the socket.
|
||||
|
||||
/proc/net/atalk_iface lists all the interfaces configured for appletalk.It
|
||||
shows the name of the interface, its Appletalk address, the network range on
|
||||
that address (or network number for phase 1 networks), and the status of the
|
||||
interface.
|
||||
|
||||
/proc/net/atalk_route lists each known network route. It lists the target
|
||||
(network) that the route leads to, the router (may be directly connected), the
|
||||
route flags, and the device the route is using.
|
||||
|
||||
5. TIPC
|
||||
4. TIPC
|
||||
-------
|
||||
|
||||
tipc_rmem
|
||||
|
||||
@@ -1968,10 +1968,9 @@ F: drivers/hwmon/applesmc.c
|
||||
|
||||
APPLETALK NETWORK LAYER
|
||||
L: netdev@vger.kernel.org
|
||||
S: Odd fixes
|
||||
F: include/linux/atalk.h
|
||||
S: Obsolete
|
||||
F: include/uapi/linux/atalk.h
|
||||
F: net/appletalk/
|
||||
F: include/uapi/linux/if_ltalk.h
|
||||
|
||||
APPLIED MICRO (APM) X-GENE DEVICE TREE SUPPORT
|
||||
M: Khuong Dinh <khuong@os.amperecomputing.com>
|
||||
|
||||
@@ -55,7 +55,6 @@ CONFIG_ATM=y
|
||||
CONFIG_ATM_BR2684=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -236,7 +236,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -232,7 +232,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -239,7 +239,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -229,7 +229,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -231,7 +231,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -230,7 +230,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -250,7 +250,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -228,7 +228,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -229,7 +229,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -230,7 +230,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -225,7 +225,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -226,7 +226,6 @@ CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_BATMAN_ADV=m
|
||||
# CONFIG_BATMAN_ADV_BATMAN_V is not set
|
||||
|
||||
@@ -91,7 +91,6 @@ CONFIG_ATM_BR2684=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_LLC2=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -170,7 +170,6 @@ CONFIG_IP_SCTP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -174,7 +174,6 @@ CONFIG_IP_SCTP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -46,7 +46,6 @@ CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -48,7 +48,6 @@ CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -49,7 +49,6 @@ CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -50,7 +50,6 @@ CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -47,7 +47,6 @@ CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -171,7 +171,6 @@ CONFIG_IP_SCTP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -136,7 +136,6 @@ CONFIG_ATM_BR2684=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_LLC2=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -228,7 +228,6 @@ CONFIG_ATM=m
|
||||
CONFIG_ATM_BR2684=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
|
||||
@@ -24,7 +24,6 @@ CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_PNP=y
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_ATA=y
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __LINUX_ATALK_H__
|
||||
#define __LINUX_ATALK_H__
|
||||
|
||||
|
||||
#include <net/sock.h>
|
||||
#include <uapi/linux/atalk.h>
|
||||
|
||||
struct atalk_route {
|
||||
struct net_device *dev;
|
||||
struct atalk_addr target;
|
||||
struct atalk_addr gateway;
|
||||
int flags;
|
||||
struct atalk_route *next;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct atalk_iface - AppleTalk Interface
|
||||
* @dev - Network device associated with this interface
|
||||
* @address - Our address
|
||||
* @status - What are we doing?
|
||||
* @nets - Associated direct netrange
|
||||
* @next - next element in the list of interfaces
|
||||
*/
|
||||
struct atalk_iface {
|
||||
struct net_device *dev;
|
||||
struct atalk_addr address;
|
||||
int status;
|
||||
#define ATIF_PROBE 1 /* Probing for an address */
|
||||
#define ATIF_PROBE_FAIL 2 /* Probe collided */
|
||||
struct atalk_netrange nets;
|
||||
struct atalk_iface *next;
|
||||
struct hlist_node hash_node; /* keyed on dev->ifindex */
|
||||
};
|
||||
|
||||
struct atalk_sock {
|
||||
/* struct sock has to be the first member of atalk_sock */
|
||||
struct sock sk;
|
||||
__be16 dest_net;
|
||||
__be16 src_net;
|
||||
unsigned char dest_node;
|
||||
unsigned char src_node;
|
||||
unsigned char dest_port;
|
||||
unsigned char src_port;
|
||||
};
|
||||
|
||||
static inline struct atalk_sock *at_sk(struct sock *sk)
|
||||
{
|
||||
return (struct atalk_sock *)sk;
|
||||
}
|
||||
|
||||
struct ddpehdr {
|
||||
__be16 deh_len_hops; /* lower 10 bits are length, next 4 - hops */
|
||||
__be16 deh_sum;
|
||||
__be16 deh_dnet;
|
||||
__be16 deh_snet;
|
||||
__u8 deh_dnode;
|
||||
__u8 deh_snode;
|
||||
__u8 deh_dport;
|
||||
__u8 deh_sport;
|
||||
/* And netatalk apps expect to stick the type in themselves */
|
||||
};
|
||||
|
||||
static __inline__ struct ddpehdr *ddp_hdr(struct sk_buff *skb)
|
||||
{
|
||||
return (struct ddpehdr *)skb_transport_header(skb);
|
||||
}
|
||||
|
||||
/* AppleTalk AARP headers */
|
||||
struct elapaarp {
|
||||
__be16 hw_type;
|
||||
#define AARP_HW_TYPE_ETHERNET 1
|
||||
#define AARP_HW_TYPE_TOKENRING 2
|
||||
__be16 pa_type;
|
||||
__u8 hw_len;
|
||||
__u8 pa_len;
|
||||
#define AARP_PA_ALEN 4
|
||||
__be16 function;
|
||||
#define AARP_REQUEST 1
|
||||
#define AARP_REPLY 2
|
||||
#define AARP_PROBE 3
|
||||
__u8 hw_src[ETH_ALEN];
|
||||
__u8 pa_src_zero;
|
||||
__be16 pa_src_net;
|
||||
__u8 pa_src_node;
|
||||
__u8 hw_dst[ETH_ALEN];
|
||||
__u8 pa_dst_zero;
|
||||
__be16 pa_dst_net;
|
||||
__u8 pa_dst_node;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb)
|
||||
{
|
||||
return (struct elapaarp *)skb_transport_header(skb);
|
||||
}
|
||||
|
||||
/* Not specified - how long till we drop a resolved entry */
|
||||
#define AARP_EXPIRY_TIME (5 * 60 * HZ)
|
||||
/* Size of hash table */
|
||||
#define AARP_HASH_SIZE 16
|
||||
/* Fast retransmission timer when resolving */
|
||||
#define AARP_TICK_TIME (HZ / 5)
|
||||
/* Send 10 requests then give up (2 seconds) */
|
||||
#define AARP_RETRANSMIT_LIMIT 10
|
||||
/*
|
||||
* Some value bigger than total retransmit time + a bit for last reply to
|
||||
* appear and to stop continual requests
|
||||
*/
|
||||
#define AARP_RESOLVE_TIME (10 * HZ)
|
||||
|
||||
extern struct datalink_proto *ddp_dl, *aarp_dl;
|
||||
extern int aarp_proto_init(void);
|
||||
|
||||
/* Inter module exports */
|
||||
|
||||
/* Give a device find its atif control structure */
|
||||
extern struct atalk_iface *atalk_find_dev(struct net_device *dev);
|
||||
|
||||
extern struct atalk_addr *atalk_find_dev_addr(struct net_device *dev);
|
||||
extern struct net_device *atrtr_get_dev(struct atalk_addr *sa);
|
||||
extern int aarp_send_ddp(struct net_device *dev,
|
||||
struct sk_buff *skb,
|
||||
struct atalk_addr *sa, void *hwaddr);
|
||||
extern void aarp_device_down(struct net_device *dev);
|
||||
extern void aarp_probe_network(struct atalk_iface *atif);
|
||||
extern int aarp_proxy_probe_network(struct atalk_iface *atif,
|
||||
struct atalk_addr *sa);
|
||||
extern void aarp_proxy_remove(struct net_device *dev,
|
||||
struct atalk_addr *sa);
|
||||
|
||||
extern void aarp_cleanup_module(void);
|
||||
|
||||
extern struct hlist_head atalk_sockets;
|
||||
extern rwlock_t atalk_sockets_lock;
|
||||
|
||||
extern struct atalk_route *atalk_routes;
|
||||
extern rwlock_t atalk_routes_lock;
|
||||
|
||||
extern struct atalk_iface *atalk_interfaces;
|
||||
extern rwlock_t atalk_interfaces_lock;
|
||||
|
||||
extern struct atalk_route atrtr_default;
|
||||
|
||||
struct aarp_iter_state {
|
||||
int bucket;
|
||||
struct aarp_entry **table;
|
||||
};
|
||||
|
||||
extern const struct seq_operations aarp_seq_ops;
|
||||
|
||||
extern int sysctl_aarp_expiry_time;
|
||||
extern int sysctl_aarp_tick_time;
|
||||
extern int sysctl_aarp_retransmit_limit;
|
||||
extern int sysctl_aarp_resolve_time;
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
extern int atalk_register_sysctl(void);
|
||||
extern void atalk_unregister_sysctl(void);
|
||||
#else
|
||||
static inline int atalk_register_sysctl(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void atalk_unregister_sysctl(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
extern int atalk_proc_init(void);
|
||||
extern void atalk_proc_exit(void);
|
||||
#else
|
||||
static inline int atalk_proc_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void atalk_proc_exit(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
||||
#endif /* __LINUX_ATALK_H__ */
|
||||
@@ -6,7 +6,6 @@
|
||||
obj-$(CONFIG_LLC) += psnap.o
|
||||
obj-$(CONFIG_NET_FC) += fc.o
|
||||
obj-$(CONFIG_FDDI) += fddi.o
|
||||
obj-$(CONFIG_ATALK) += psnap.o
|
||||
obj-$(CONFIG_STP) += stp.o
|
||||
obj-$(CONFIG_GARP) += garp.o
|
||||
obj-$(CONFIG_MRP) += mrp.o
|
||||
|
||||
@@ -261,7 +261,6 @@ source "net/bridge/Kconfig"
|
||||
source "net/dsa/Kconfig"
|
||||
source "net/8021q/Kconfig"
|
||||
source "net/llc/Kconfig"
|
||||
source "net/appletalk/Kconfig"
|
||||
source "net/x25/Kconfig"
|
||||
source "net/lapb/Kconfig"
|
||||
source "net/phonet/Kconfig"
|
||||
|
||||
@@ -25,7 +25,6 @@ obj-$(CONFIG_NET_KEY) += key/
|
||||
obj-$(CONFIG_BRIDGE) += bridge/
|
||||
obj-$(CONFIG_NET_DEVLINK) += devlink/
|
||||
obj-y += dsa/
|
||||
obj-$(CONFIG_ATALK) += appletalk/
|
||||
obj-$(CONFIG_X25) += x25/
|
||||
obj-$(CONFIG_LAPB) += lapb/
|
||||
obj-$(CONFIG_CAN) += can/
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Appletalk configuration
|
||||
#
|
||||
config ATALK
|
||||
tristate "Appletalk protocol support"
|
||||
select LLC
|
||||
help
|
||||
AppleTalk is the protocol that Apple computers can use to communicate
|
||||
on a network. If your Linux box is connected to such a network and you
|
||||
wish to connect to it, say Y. You will need to use the netatalk package
|
||||
so that your Linux box can act as a print and file server for Macs as
|
||||
well as access AppleTalk printers. Check out
|
||||
<http://www.zettabyte.net/netatalk/> on the WWW for details.
|
||||
EtherTalk is the name used for AppleTalk over Ethernet and the
|
||||
cheaper and slower LocalTalk is AppleTalk over a proprietary Apple
|
||||
network using serial links. EtherTalk and LocalTalk are fully
|
||||
supported by Linux.
|
||||
|
||||
General information about how to connect Linux, Windows machines and
|
||||
Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>. The
|
||||
NET3-4-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>, contains valuable
|
||||
information as well.
|
||||
|
||||
To compile this driver as a module, choose M here: the module will be
|
||||
called appletalk. You almost certainly want to compile it as a
|
||||
module so you can restart your AppleTalk stack without rebooting
|
||||
your machine. I hear that the GNU boycott of Apple is over, so
|
||||
even politically correct people are allowed to say Y here.
|
||||
@@ -1,10 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Makefile for the Linux AppleTalk layer.
|
||||
#
|
||||
|
||||
obj-$(CONFIG_ATALK) += appletalk.o
|
||||
|
||||
appletalk-y := aarp.o ddp.o
|
||||
appletalk-$(CONFIG_PROC_FS) += atalk_proc.o
|
||||
appletalk-$(CONFIG_SYSCTL) += sysctl_net_atalk.o
|
||||
1041
net/appletalk/aarp.c
1041
net/appletalk/aarp.c
File diff suppressed because it is too large
Load Diff
@@ -1,242 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* atalk_proc.c - proc support for Appletalk
|
||||
*
|
||||
* Copyright(c) Arnaldo Carvalho de Melo <acme@conectiva.com.br>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <net/net_namespace.h>
|
||||
#include <net/sock.h>
|
||||
#include <linux/atalk.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
|
||||
static __inline__ struct atalk_iface *atalk_get_interface_idx(loff_t pos)
|
||||
{
|
||||
struct atalk_iface *i;
|
||||
|
||||
for (i = atalk_interfaces; pos && i; i = i->next)
|
||||
--pos;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
static void *atalk_seq_interface_start(struct seq_file *seq, loff_t *pos)
|
||||
__acquires(atalk_interfaces_lock)
|
||||
{
|
||||
loff_t l = *pos;
|
||||
|
||||
read_lock_bh(&atalk_interfaces_lock);
|
||||
return l ? atalk_get_interface_idx(--l) : SEQ_START_TOKEN;
|
||||
}
|
||||
|
||||
static void *atalk_seq_interface_next(struct seq_file *seq, void *v, loff_t *pos)
|
||||
{
|
||||
struct atalk_iface *i;
|
||||
|
||||
++*pos;
|
||||
if (v == SEQ_START_TOKEN) {
|
||||
i = NULL;
|
||||
if (atalk_interfaces)
|
||||
i = atalk_interfaces;
|
||||
goto out;
|
||||
}
|
||||
i = v;
|
||||
i = i->next;
|
||||
out:
|
||||
return i;
|
||||
}
|
||||
|
||||
static void atalk_seq_interface_stop(struct seq_file *seq, void *v)
|
||||
__releases(atalk_interfaces_lock)
|
||||
{
|
||||
read_unlock_bh(&atalk_interfaces_lock);
|
||||
}
|
||||
|
||||
static int atalk_seq_interface_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
struct atalk_iface *iface;
|
||||
|
||||
if (v == SEQ_START_TOKEN) {
|
||||
seq_puts(seq, "Interface Address Networks "
|
||||
"Status\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
iface = v;
|
||||
seq_printf(seq, "%-16s %04X:%02X %04X-%04X %d\n",
|
||||
iface->dev->name, ntohs(iface->address.s_net),
|
||||
iface->address.s_node, ntohs(iface->nets.nr_firstnet),
|
||||
ntohs(iface->nets.nr_lastnet), iface->status);
|
||||
out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static __inline__ struct atalk_route *atalk_get_route_idx(loff_t pos)
|
||||
{
|
||||
struct atalk_route *r;
|
||||
|
||||
for (r = atalk_routes; pos && r; r = r->next)
|
||||
--pos;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static void *atalk_seq_route_start(struct seq_file *seq, loff_t *pos)
|
||||
__acquires(atalk_routes_lock)
|
||||
{
|
||||
loff_t l = *pos;
|
||||
|
||||
read_lock_bh(&atalk_routes_lock);
|
||||
return l ? atalk_get_route_idx(--l) : SEQ_START_TOKEN;
|
||||
}
|
||||
|
||||
static void *atalk_seq_route_next(struct seq_file *seq, void *v, loff_t *pos)
|
||||
{
|
||||
struct atalk_route *r;
|
||||
|
||||
++*pos;
|
||||
if (v == SEQ_START_TOKEN) {
|
||||
r = NULL;
|
||||
if (atalk_routes)
|
||||
r = atalk_routes;
|
||||
goto out;
|
||||
}
|
||||
r = v;
|
||||
r = r->next;
|
||||
out:
|
||||
return r;
|
||||
}
|
||||
|
||||
static void atalk_seq_route_stop(struct seq_file *seq, void *v)
|
||||
__releases(atalk_routes_lock)
|
||||
{
|
||||
read_unlock_bh(&atalk_routes_lock);
|
||||
}
|
||||
|
||||
static int atalk_seq_route_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
struct atalk_route *rt;
|
||||
|
||||
if (v == SEQ_START_TOKEN) {
|
||||
seq_puts(seq, "Target Router Flags Dev\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (atrtr_default.dev) {
|
||||
rt = &atrtr_default;
|
||||
seq_printf(seq, "Default %04X:%02X %-4d %s\n",
|
||||
ntohs(rt->gateway.s_net), rt->gateway.s_node,
|
||||
rt->flags, rt->dev->name);
|
||||
}
|
||||
|
||||
rt = v;
|
||||
seq_printf(seq, "%04X:%02X %04X:%02X %-4d %s\n",
|
||||
ntohs(rt->target.s_net), rt->target.s_node,
|
||||
ntohs(rt->gateway.s_net), rt->gateway.s_node,
|
||||
rt->flags, rt->dev->name);
|
||||
out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *atalk_seq_socket_start(struct seq_file *seq, loff_t *pos)
|
||||
__acquires(atalk_sockets_lock)
|
||||
{
|
||||
read_lock_bh(&atalk_sockets_lock);
|
||||
return seq_hlist_start_head(&atalk_sockets, *pos);
|
||||
}
|
||||
|
||||
static void *atalk_seq_socket_next(struct seq_file *seq, void *v, loff_t *pos)
|
||||
{
|
||||
return seq_hlist_next(v, &atalk_sockets, pos);
|
||||
}
|
||||
|
||||
static void atalk_seq_socket_stop(struct seq_file *seq, void *v)
|
||||
__releases(atalk_sockets_lock)
|
||||
{
|
||||
read_unlock_bh(&atalk_sockets_lock);
|
||||
}
|
||||
|
||||
static int atalk_seq_socket_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
struct sock *s;
|
||||
struct atalk_sock *at;
|
||||
|
||||
if (v == SEQ_START_TOKEN) {
|
||||
seq_printf(seq, "Type Local_addr Remote_addr Tx_queue "
|
||||
"Rx_queue St UID\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
s = sk_entry(v);
|
||||
at = at_sk(s);
|
||||
|
||||
seq_printf(seq, "%02X %04X:%02X:%02X %04X:%02X:%02X %08X:%08X "
|
||||
"%02X %u\n",
|
||||
s->sk_type, ntohs(at->src_net), at->src_node, at->src_port,
|
||||
ntohs(at->dest_net), at->dest_node, at->dest_port,
|
||||
sk_wmem_alloc_get(s),
|
||||
sk_rmem_alloc_get(s),
|
||||
s->sk_state,
|
||||
from_kuid_munged(seq_user_ns(seq), sk_uid(s)));
|
||||
out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct seq_operations atalk_seq_interface_ops = {
|
||||
.start = atalk_seq_interface_start,
|
||||
.next = atalk_seq_interface_next,
|
||||
.stop = atalk_seq_interface_stop,
|
||||
.show = atalk_seq_interface_show,
|
||||
};
|
||||
|
||||
static const struct seq_operations atalk_seq_route_ops = {
|
||||
.start = atalk_seq_route_start,
|
||||
.next = atalk_seq_route_next,
|
||||
.stop = atalk_seq_route_stop,
|
||||
.show = atalk_seq_route_show,
|
||||
};
|
||||
|
||||
static const struct seq_operations atalk_seq_socket_ops = {
|
||||
.start = atalk_seq_socket_start,
|
||||
.next = atalk_seq_socket_next,
|
||||
.stop = atalk_seq_socket_stop,
|
||||
.show = atalk_seq_socket_show,
|
||||
};
|
||||
|
||||
int __init atalk_proc_init(void)
|
||||
{
|
||||
if (!proc_mkdir("atalk", init_net.proc_net))
|
||||
return -ENOMEM;
|
||||
|
||||
if (!proc_create_seq("atalk/interface", 0444, init_net.proc_net,
|
||||
&atalk_seq_interface_ops))
|
||||
goto out;
|
||||
|
||||
if (!proc_create_seq("atalk/route", 0444, init_net.proc_net,
|
||||
&atalk_seq_route_ops))
|
||||
goto out;
|
||||
|
||||
if (!proc_create_seq("atalk/socket", 0444, init_net.proc_net,
|
||||
&atalk_seq_socket_ops))
|
||||
goto out;
|
||||
|
||||
if (!proc_create_seq_private("atalk/arp", 0444, init_net.proc_net,
|
||||
&aarp_seq_ops,
|
||||
sizeof(struct aarp_iter_state), NULL))
|
||||
goto out;
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
remove_proc_subtree("atalk", init_net.proc_net);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
void atalk_proc_exit(void)
|
||||
{
|
||||
remove_proc_subtree("atalk", init_net.proc_net);
|
||||
}
|
||||
2055
net/appletalk/ddp.c
2055
net/appletalk/ddp.c
File diff suppressed because it is too large
Load Diff
@@ -1,58 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* sysctl_net_atalk.c: sysctl interface to net AppleTalk subsystem.
|
||||
*
|
||||
* Begun April 1, 1996, Mike Shaver.
|
||||
* Added /proc/sys/net/atalk directory entry (empty =) ). [MS]
|
||||
* Dynamic registration, added aarp entries. (5/30/97 Chris Horn)
|
||||
*/
|
||||
|
||||
#include <linux/sysctl.h>
|
||||
#include <net/sock.h>
|
||||
#include <linux/atalk.h>
|
||||
|
||||
static struct ctl_table atalk_table[] = {
|
||||
{
|
||||
.procname = "aarp-expiry-time",
|
||||
.data = &sysctl_aarp_expiry_time,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
{
|
||||
.procname = "aarp-tick-time",
|
||||
.data = &sysctl_aarp_tick_time,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
{
|
||||
.procname = "aarp-retransmit-limit",
|
||||
.data = &sysctl_aarp_retransmit_limit,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{
|
||||
.procname = "aarp-resolve-time",
|
||||
.data = &sysctl_aarp_resolve_time,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
};
|
||||
|
||||
static struct ctl_table_header *atalk_table_header;
|
||||
|
||||
int __init atalk_register_sysctl(void)
|
||||
{
|
||||
atalk_table_header = register_net_sysctl(&init_net, "net/appletalk", atalk_table);
|
||||
if (!atalk_table_header)
|
||||
return -ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void atalk_unregister_sysctl(void)
|
||||
{
|
||||
unregister_net_sysctl_table(atalk_table_header);
|
||||
}
|
||||
Reference in New Issue
Block a user