apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apr/network_io/win32 sockaddr.c
Date Fri, 01 Dec 2000 18:47:33 GMT
trawick     00/12/01 10:47:32

  Modified:    include  apr_network_io.h
               network_io/beos sockaddr.c
               network_io/unix sa_common.c sockaddr.c
               network_io/win32 sockaddr.c
  Log:
  Get rid of apr_get_socket_inaddr(), apr_get_remote_name(), and
  apr_get_local_name().  Use apr_get_sockaddr() instead.
  
  Revision  Changes    Path
  1.85      +0 -23     apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_network_io.h,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- apr_network_io.h	2000/11/26 03:00:02	1.84
  +++ apr_network_io.h	2000/12/01 18:47:28	1.85
  @@ -498,20 +498,6 @@
   apr_status_t apr_get_ipaddr(char **addr, apr_sockaddr_t *sockaddr);
   
   /**
  - * Return the local socket name as a BSD style struct sockaddr_in.
  - * @param name The local name associated with the socket.
  - * @param sock The socket to use 
  - */
  -apr_status_t apr_get_local_name(struct sockaddr_in **name, apr_socket_t *sock);
  -
  -/**
  - * Return the remote socket name as a BSD style struct sockaddr_in.
  - * @param name The remote name associated with the socket.
  - * @param sock The socket to use 
  - */
  -apr_status_t apr_get_remote_name(struct sockaddr_in **name, apr_socket_t *sock);
  -
  -/**
    * Setup the memory required for poll to operate properly>
    * @param new_poll The poll structure to be used. 
    * @param num The number of socket descriptors to be polled.
  @@ -637,15 +623,6 @@
    * @param hostname The hostname to lookup.
    */
   apr_status_t apr_get_inaddr(apr_in_addr_t *addr, char *hostname);
  -
  -/**
  - * Given an apr_socket_t get the apr_in_addr_t for the requested interface
  - * @param addr The apr_in_addr_t structure to return
  - * @param which The interface to return for
  - * @param sock The apr_socket_t to use
  - */
  -apr_status_t apr_get_socket_inaddr(apr_in_addr_t *addr, apr_interface_e which,
  -                                   apr_socket_t *sock);
   
   /**
    * Given an apr_sockaddr_t and a service name, set the port for the service
  
  
  
  1.19      +0 -19     apr/network_io/beos/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/beos/sockaddr.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- sockaddr.c	2000/11/21 19:08:24	1.18
  +++ sockaddr.c	2000/12/01 18:47:29	1.19
  @@ -75,23 +75,4 @@
   /* Include this here so we already have get_local_addr... */
   #include "../unix/sa_common.c"
   
  -apr_status_t get_local_name(struct sockaddr_in **name, apr_socket_t *sock)
  -{
  -    if (!sock) {
  -        return APR_EBADF;
  -    }
  -
  -    *name = sock->local_addr;
  -    return APR_SUCCESS;
  -}
  -
  -apr_status_t apr_get_remote_name(struct sockaddr_in **name, apr_socket_t *sock)
  -{
  -    if (!sock) {
  -        return APR_EBADF;
  -    }
  -
  -    *name = sock->remote_addr;
  -    return APR_SUCCESS;
  -}
   #endif
  
  
  
  1.15      +0 -23     apr/network_io/unix/sa_common.c
  
  Index: sa_common.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sa_common.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- sa_common.c	2000/11/24 00:21:35	1.14
  +++ sa_common.c	2000/12/01 18:47:31	1.15
  @@ -136,29 +136,6 @@
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_get_socket_inaddr(apr_in_addr_t *addr, apr_interface_e which,
  -                        apr_socket_t *sock)
  -{
  -    if (which == APR_LOCAL){
  -        if (sock->local_interface_unknown) {
  -            apr_status_t rv = get_local_addr(sock);
  -
  -            if (rv != APR_SUCCESS){
  -                return rv;
  -            }
  -        }
  -
  -        /* XXX IPv6 */
  -        *addr = *(apr_in_addr_t *)&sock->local_addr->sa.sin.sin_addr;
  -    } else if (which == APR_REMOTE) {
  -        /* XXX IPv6 */
  -        *addr = *(apr_in_addr_t *)&sock->remote_addr->sa.sin.sin_addr;
  -    } else {
  -        return APR_EINVAL;
  -    }
  -    return APR_SUCCESS;
  -}
  -
   static void set_sockaddr_vars(apr_sockaddr_t *addr, int family)
   {
       addr->sa.sin.sin_family = family;
  
  
  
  1.25      +0 -25     apr/network_io/unix/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- sockaddr.c	2000/11/21 21:33:06	1.24
  +++ sockaddr.c	2000/12/01 18:47:31	1.25
  @@ -70,28 +70,3 @@
   
   /* included here to allow us to use local_addr */
   #include "sa_common.c"
  -
  -#if APR_HAVE_NETINET_IN_H
  -/* XXX IPv6 */
  -apr_status_t apr_get_local_name(struct sockaddr_in **name, apr_socket_t *sock)
  -{
  -    if (sock->local_port_unknown || sock->local_interface_unknown) {
  -        apr_status_t rv = get_local_addr(sock);
  -
  -        if (rv != APR_SUCCESS) {
  -            return rv;
  -        }
  -    }
  -
  -    *name = &sock->local_addr->sa.sin;
  -    return APR_SUCCESS;
  -}
  -
  -
  -/* XXX IPv6 */
  -apr_status_t apr_get_remote_name(struct sockaddr_in **name, apr_socket_t *sock)
  -{
  -    *name = &sock->remote_addr->sa.sin;
  -    return APR_SUCCESS;
  -}
  -#endif
  
  
  
  1.23      +0 -21     apr/network_io/win32/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sockaddr.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- sockaddr.c	2000/11/21 21:33:07	1.22
  +++ sockaddr.c	2000/12/01 18:47:32	1.23
  @@ -74,24 +74,3 @@
   /* Include this here so we have get_local_addr defined... */
   #include "../unix/sa_common.c"
   
  -apr_status_t apr_get_local_name(struct sockaddr_in **name, apr_socket_t *sock)
  -{
  -    if (sock->local_port_unknown || sock->local_interface_unknown) {
  -        apr_status_t rv = get_local_addr(sock);
  -
  -        if (rv != APR_SUCCESS) {
  -            return rv;
  -        }
  -    }
  -
  -    *name = &sock->local_addr->sa.sin;
  -    return APR_SUCCESS;
  -}
  -
  -
  -
  -apr_status_t apr_get_remote_name(struct sockaddr_in **name, apr_socket_t *sock)
  -{
  -    *name = &sock->remote_addr->sa.sin;
  -    return APR_SUCCESS;
  -}
  
  
  

Mime
View raw message