Browse Source

caif: Rewritten socket implementation

Changes:
 This is a complete re-write of the socket layer. Making the socket
 implementation more aligned with the other socket layers and using more
 of the support functions available in sock.c. Lots of code is copied
 from af_unix (and some from af_irda).
 Non-blocking mode should be working as well.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sjur Braendeland 15 years ago
parent
commit
bece7b2398
2 changed files with 559 additions and 556 deletions
  1. 3 2
      include/linux/caif/caif_socket.h
  2. 556 554
      net/caif/caif_socket.c

+ 3 - 2
include/linux/caif/caif_socket.h

@@ -16,7 +16,6 @@
 #include <sys/socket.h>
 #include <sys/socket.h>
 #endif
 #endif
 
 
-
 /**
 /**
  * enum caif_link_selector -    Physical Link Selection.
  * enum caif_link_selector -    Physical Link Selection.
  * @CAIF_LINK_HIGH_BANDW:	Physical interface for high-bandwidth
  * @CAIF_LINK_HIGH_BANDW:	Physical interface for high-bandwidth
@@ -59,7 +58,7 @@ enum caif_channel_priority {
 /**
 /**
  * enum caif_protocol_type  -	CAIF Channel type.
  * enum caif_protocol_type  -	CAIF Channel type.
  * @CAIFPROTO_AT:		Classic AT channel.
  * @CAIFPROTO_AT:		Classic AT channel.
- * @CAIFPROTO_DATAGRAM:		Datagram channel.
+ * @CAIFPROTO_DATAGRAM:	Datagram channel.
  * @CAIFPROTO_DATAGRAM_LOOP:	Datagram loopback channel, used for testing.
  * @CAIFPROTO_DATAGRAM_LOOP:	Datagram loopback channel, used for testing.
  * @CAIFPROTO_UTIL:		Utility (Psock) channel.
  * @CAIFPROTO_UTIL:		Utility (Psock) channel.
  * @CAIFPROTO_RFM:		Remote File Manager
  * @CAIFPROTO_RFM:		Remote File Manager
@@ -87,6 +86,7 @@ enum caif_at_type {
 
 
 /**
 /**
  * struct sockaddr_caif - the sockaddr structure for CAIF sockets.
  * struct sockaddr_caif - the sockaddr structure for CAIF sockets.
+ * @family:		     Address family number, must be AF_CAIF.
  * @u:			     Union of address data 'switched' by family.
  * @u:			     Union of address data 'switched' by family.
  * :
  * :
  * @u.at:                    Applies when family = CAIFPROTO_AT.
  * @u.at:                    Applies when family = CAIFPROTO_AT.
@@ -153,6 +153,7 @@ struct sockaddr_caif {
  *
  *
  *
  *
  * This enum defines the CAIF Socket options to be used on a socket
  * This enum defines the CAIF Socket options to be used on a socket
+ * of type PF_CAIF.
  *
  *
  */
  */
 enum caif_socket_opts {
 enum caif_socket_opts {

File diff suppressed because it is too large
+ 556 - 554
net/caif/caif_socket.c


Some files were not shown because too many files changed in this diff