NFC: add NFC socket family

Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Aloisio Almeida Jr
2011-07-01 19:31:35 -03:00
committed by John W. Linville
parent 4d12b8b129
commit c7fe3b52c1
7 changed files with 129 additions and 5 deletions

View File

@@ -25,6 +25,7 @@
#define __LOCAL_NFC_H
#include <net/nfc.h>
#include <net/sock.h>
__attribute__((format (printf, 2, 3)))
int nfc_printk(const char *level, const char *fmt, ...);
@@ -33,6 +34,19 @@ int nfc_printk(const char *level, const char *fmt, ...);
#define nfc_err(fmt, arg...) nfc_printk(KERN_ERR, fmt, ##arg)
#define nfc_dbg(fmt, arg...) pr_debug(fmt "\n", ##arg)
struct nfc_protocol {
int id;
struct proto *proto;
struct module *owner;
int (*create)(struct net *net, struct socket *sock,
const struct nfc_protocol *nfc_proto);
};
int __init af_nfc_init(void);
void af_nfc_exit(void);
int nfc_proto_register(const struct nfc_protocol *nfc_proto);
void nfc_proto_unregister(const struct nfc_protocol *nfc_proto);
extern int nfc_devlist_generation;
extern struct mutex nfc_devlist_mutex;