Subject: [Tsvwg] draft-ietf-tsvwg-sctpsocket-04.txt proposed corrections

From: Craig Rodrigues <[email-masked]>
Date: Fri, 14 Jun 2002 14:31:28 -0400

Hi,

Here is a patch to draft-ietf-tsvwg-sctpsocket-04.txt to
change a few of the types in some of the function prototypes
on the socket calls to use socklen_t where appropriate.

Thanks.
-- 
Craig Rodrigues        Distributed Systems and Logistics, Office 6/304
[email-masked]       BBN Technologies, a Verizon company
(617) 873-4725         Cambridge, MA

--- draft-ietf-tsvwg-sctpsocket-04.txt.orig	Fri Jun 14 13:48:43 2002
+++ draft-ietf-tsvwg-sctpsocket-04.txt	Fri Jun 14 14:14:00 2002
@@ -308,7 +308,7 @@
 
     The syntax of bind() is,
 
-     ret = bind(int sd, struct sockaddr *addr, int addrlen);
+     ret = bind(int sd, struct sockaddr *addr, socklen_t addrlen);
 
      sd      - the socket descriptor returned by socket().
      addr    - the address structure (struct sockaddr_in or struct
@@ -478,7 +478,7 @@
 
     The syntax is
 
-      ret = connect(int sd, const struct sockaddr *nam, int len);
+      ret = connect(int sd, const struct sockaddr *nam, socklen_t len);
 
       sd      - the socket descriptor to have a new association added
                 to.
@@ -658,7 +658,7 @@
 
     The syntax is:
 
-     int bind(int sd, struct sockaddr *addr, int addrlen);
+     int bind(int sd, struct sockaddr *addr, socklen_t addrlen);
 
       sd      - the socket descriptor returned by socket() call.
       addr    - the address structure (either struct sockaddr_in or struct
@@ -736,7 +736,7 @@
 
     The syntax is
 
-     int connect(int sd, const struct sockaddr *addr, int addrlen);
+     int connect(int sd, const struct sockaddr *addr, socklen_t addrlen);
 
       sd      - the socket descriptor of the endpoint.
       addr    - the peer's address.
@@ -1826,7 +1826,7 @@
 
       ssize_t send(int sd, connst void *msg, size_t len, int flags);
       ssize_t sendto(int sd, const void *msg, size_t len, int flags,
-	             const struct sockaddr *to, int tolen);
+	             const struct sockaddr *to, socklen_t tolen);
 
 Stewart et.al.                                                 [Page 31]
 
@@ -1834,7 +1834,7 @@
 
       ssize_t recv(int sd, void *buf, size_t len, int flags);
       ssize_t recvfrom(int sd, void *buf, size_t len, int flags,
-                       struct sockaddr *from, int *fromlen);
+                       struct sockaddr *from, socklen_t *fromlen);
 
        sd      - the socket descriptor of an SCTP endpoint.
        msg     - the message to be sent.
@@ -1896,9 +1896,9 @@
     The syntax is:
 
     ret = getsockopt(int sd, int level, int optname, void *optval,
-                     size_t *optlen);
+                     socklen_t *optlen);
     ret = setsockopt(int sd, int level, int optname, const void *optval,
-                     size_t optlen);
+                     socklen_t optlen);
 
       sd      - the socket descript.
       level   - set to IPPROTO_SCTP for all SCTP options.