From: Eric Paris <eparis@redhat.com>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
netdev@vger.kernel.org
Cc: davem@davemloft.net, viro@zeniv.linux.org.uk,
alan@linux.intel.com, hch@infradead.org
Subject: [PATCH 3/9] networking/fanotify: declare fanotify socket numbers
Date: Fri, 28 Aug 2009 14:55:57 -0400 [thread overview]
Message-ID: <20090828185556.8014.70319.stgit@paris.rdu.redhat.com> (raw)
In-Reply-To: <20090828185542.8014.22791.stgit@paris.rdu.redhat.com>
fanotify's user interface uses a custom socket (it doesn't use netlink
since work must be done in the context of the receive side of the socket)
This patch simply defines the fanotify socket number declarations. The
actual implementation of the socket is in a later patch.
Signed-off-by: Eric Paris <eparis@redhat.com>
---
include/linux/socket.h | 5 ++++-
net/core/sock.c | 6 +++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 3b461df..e03f47b 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -195,7 +195,8 @@ struct ucred {
#define AF_ISDN 34 /* mISDN sockets */
#define AF_PHONET 35 /* Phonet sockets */
#define AF_IEEE802154 36 /* IEEE802154 sockets */
-#define AF_MAX 37 /* For now.. */
+#define AF_FANOTIFY 37 /* fscking all access sockets */
+#define AF_MAX 38 /* For now.. */
/* Protocol families, same as address families. */
#define PF_UNSPEC AF_UNSPEC
@@ -235,6 +236,7 @@ struct ucred {
#define PF_ISDN AF_ISDN
#define PF_PHONET AF_PHONET
#define PF_IEEE802154 AF_IEEE802154
+#define PF_FANOTIFY AF_FANOTIFY
#define PF_MAX AF_MAX
/* Maximum queue length specifiable by listen. */
@@ -306,6 +308,7 @@ struct ucred {
#define SOL_PNPIPE 275
#define SOL_RDS 276
#define SOL_IUCV 277
+#define SOL_FANOTIFY 278
/* IPX options */
#define IPX_TYPE 1
diff --git a/net/core/sock.c b/net/core/sock.c
index 3ac34ea..1259525 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -155,7 +155,7 @@ static const char *const af_family_key_strings[AF_MAX+1] = {
"sk_lock-27" , "sk_lock-28" , "sk_lock-AF_CAN" ,
"sk_lock-AF_TIPC" , "sk_lock-AF_BLUETOOTH", "sk_lock-IUCV" ,
"sk_lock-AF_RXRPC" , "sk_lock-AF_ISDN" , "sk_lock-AF_PHONET" ,
- "sk_lock-AF_IEEE802154",
+ "sk_lock-AF_IEEE802154", "sk_lock-AF_FANOTIFY",
"sk_lock-AF_MAX"
};
static const char *const af_family_slock_key_strings[AF_MAX+1] = {
@@ -171,7 +171,7 @@ static const char *const af_family_slock_key_strings[AF_MAX+1] = {
"slock-27" , "slock-28" , "slock-AF_CAN" ,
"slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" ,
"slock-AF_RXRPC" , "slock-AF_ISDN" , "slock-AF_PHONET" ,
- "slock-AF_IEEE802154",
+ "slock-AF_IEEE802154", "slock=AF_FANOTIFY",
"slock-AF_MAX"
};
static const char *const af_family_clock_key_strings[AF_MAX+1] = {
@@ -187,7 +187,7 @@ static const char *const af_family_clock_key_strings[AF_MAX+1] = {
"clock-27" , "clock-28" , "clock-AF_CAN" ,
"clock-AF_TIPC" , "clock-AF_BLUETOOTH", "clock-AF_IUCV" ,
"clock-AF_RXRPC" , "clock-AF_ISDN" , "clock-AF_PHONET" ,
- "clock-AF_IEEE802154",
+ "clock-AF_IEEE802154", "clock-AF_FANOTIFY",
"clock-AF_MAX"
};
next prev parent reply other threads:[~2009-08-28 18:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 18:55 [PATCH 1/9] task_struct: add PF_NONOTIFY for fanotify to use Eric Paris
2009-08-28 18:55 ` [PATCH 2/9] vfs: introduce FMODE_NONOTIFY Eric Paris
2009-08-28 18:55 ` Eric Paris [this message]
2009-08-28 18:56 ` [PATCH 4/9] fanotify: fscking all notification system Eric Paris
2009-08-28 18:56 ` [PATCH 5/9] fanotify:drop notification if they exist in the outgoing queue Eric Paris
2009-08-28 18:56 ` [PATCH 6/9] fanotify: merge notification events with different masks Eric Paris
2009-08-28 18:56 ` [PATCH 7/9] fanotify: userspace socket Eric Paris
2009-08-28 18:56 ` [PATCH 8/9] fanotify: userspace can add and remove fsnotify inode marks Eric Paris
2009-08-28 18:56 ` [PATCH 9/9] fanotify: send events to userspace over socket reads Eric Paris
2009-08-28 22:36 ` [PATCH 1/9] task_struct: add PF_NONOTIFY for fanotify to use Evgeniy Polyakov
2009-08-28 22:39 ` Eric Paris
2009-08-28 22:50 ` Evgeniy Polyakov
2009-09-03 20:25 ` Eric Paris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090828185556.8014.70319.stgit@paris.rdu.redhat.com \
--to=eparis@redhat.com \
--cc=alan@linux.intel.com \
--cc=davem@davemloft.net \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).