1. 02 Oct, 2009 1 commit
  2. 21 Jul, 2009 1 commit
  3. 17 Jul, 2009 2 commits
    • Mike Frysinger's avatar
      connector: get test code working by default · 37cf2b8d
      Mike Frysinger authored
      
      The connector test code currently does not work out of the box.  This is
      because it uses a connector id that is above the registered limit.  So
      rather than force people to stumble through undocumented code wondering
      why it isn't working, have the test code use one of the "private" ids by
      default.  While I'm in here, clean up the code (kernel and user app) so
      that it's a bit more user friendly and verbose in significant things that
      it does.  Terse test code wastes people time as they simply enumerate it
      with all the same kind of debug messages to get a better feel of what code
      is running at any time.
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37cf2b8d
    • Mike Frysinger's avatar
      connector: make callback argument type explicit · 0741241c
      Mike Frysinger authored
      
      The connector documentation states that the argument to the callback
      function is always a pointer to a struct cn_msg, but rather than encode it
      in the API itself, it uses a void pointer everywhere.  This doesn't make
      much sense to encode the pointer in documentation as it prevents proper C
      type checking from occurring and can easily allow people to use the wrong
      pointer type.  So convert the argument type to an explicit struct cn_msg
      pointer.
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0741241c
  4. 18 Jun, 2009 1 commit
  5. 12 Feb, 2009 1 commit
  6. 19 Jul, 2007 1 commit
  7. 08 Nov, 2005 1 commit
  8. 11 Sep, 2005 1 commit
    • Evgeniy Polyakov's avatar
      [NET]: Add netlink connector. · 7672d0b5
      Evgeniy Polyakov authored
      
      Kernel connector - new userspace <-> kernel space easy to use
      communication module which implements easy to use bidirectional
      message bus using netlink as it's backend.  Connector was created to
      eliminate complex skb handling both in send and receive message bus
      direction.
      
      Connector driver adds possibility to connect various agents using as
      one of it's backends netlink based network.  One must register
      callback and identifier. When driver receives special netlink message
      with appropriate identifier, appropriate callback will be called.
      
      From the userspace point of view it's quite straightforward:
      
      	socket();
      	bind();
      	send();
      	recv();
      
      But if kernelspace want to use full power of such connections, driver
      writer must create special sockets, must know about struct sk_buff
      handling...  Connector allows any kernelspace agents to use netlink
      based networking for inter-process communication in a significantly
      easier way:
      
      int cn_add_callback(struct cb_id *id, char *name, void (*callback) (void *));
      void cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask);
      
      struct cb_id
      {
      	__u32			idx;
      	__u32			val;
      };
      
      idx and val are unique identifiers which must be registered in
      connector.h for in-kernel usage.  void (*callback) (void *) - is a
      callback function which will be called when message with above idx.val
      will be received by connector core.
      
      Using connector completely hides low-level transport layer from it's
      users.
      
      Connector uses new netlink ability to have many groups in one socket.
      
      [ Incorporating many cleanups and fixes by myself and
        Andrew Morton -DaveM ]
      Signed-off-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7672d0b5