#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <asm/unaligned.h>
#include <net/sock.h>
#include <linux/if_phonet.h>
#include <linux/phonet.h>
#include <net/phonet/phonet.h>
#include <net/phonet/pn_dev.h>
static const struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
static const struct phonet_protocol *phonet_proto_get(unsigned int protocol)
{ … }
static inline void phonet_proto_put(const struct phonet_protocol *pp)
{ … }
static int pn_socket_create(struct net *net, struct socket *sock, int protocol,
int kern)
{ … }
static const struct net_proto_family phonet_proto_family = …;
static int pn_header_create(struct sk_buff *skb, struct net_device *dev,
unsigned short type, const void *daddr,
const void *saddr, unsigned int len)
{ … }
static int pn_header_parse(const struct sk_buff *skb, unsigned char *haddr)
{ … }
const struct header_ops phonet_header_ops = …;
EXPORT_SYMBOL(…);
static int pn_send(struct sk_buff *skb, struct net_device *dev,
u16 dst, u16 src, u8 res)
{ … }
static int pn_raw_send(const void *data, int len, struct net_device *dev,
u16 dst, u16 src, u8 res)
{ … }
int pn_skb_send(struct sock *sk, struct sk_buff *skb,
const struct sockaddr_pn *target)
{ … }
EXPORT_SYMBOL(…);
static inline int can_respond(struct sk_buff *skb)
{ … }
static int send_obj_unreachable(struct sk_buff *rskb)
{ … }
static int send_reset_indications(struct sk_buff *rskb)
{ … }
static int phonet_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pkttype,
struct net_device *orig_dev)
{ … }
static struct packet_type phonet_packet_type __read_mostly = …;
static DEFINE_MUTEX(proto_tab_lock);
int __init_or_module phonet_proto_register(unsigned int protocol,
const struct phonet_protocol *pp)
{ … }
EXPORT_SYMBOL(…);
void phonet_proto_unregister(unsigned int protocol,
const struct phonet_protocol *pp)
{ … }
EXPORT_SYMBOL(…);
static int __init phonet_init(void)
{ … }
static void __exit phonet_exit(void)
{ … }
module_init(…) …;
module_exit(phonet_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_NETPROTO(…);