httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@hyperreal.org
Subject cvs commit: apache-2.0/src/lib/apr/network_io/win32 network_io.def sockets.c
Date Fri, 24 Sep 1999 18:34:41 GMT
stoddard    99/09/24 11:34:41

  Modified:    src/lib/apr/network_io/win32 network_io.def sockets.c
  Log:
  Win32: Add a few network_io functions.
  
  Revision  Changes    Path
  1.3       +16 -14    apache-2.0/src/lib/apr/network_io/win32/network_io.def
  
  Index: network_io.def
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/network_io.def,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- network_io.def	1999/09/22 19:43:37	1.2
  +++ network_io.def	1999/09/24 18:34:38	1.3
  @@ -17,17 +17,19 @@
       ap_send   @10
       ap_recv   @11
       ap_setsocketopt   @12
  -    ap_setport   @13
  -    ap_setup_poll   @14
  -    ap_poll   @15
  -    ap_add_poll_socket   @16
  -    ap_get_revents   @17
  -    ap_get_socketdata   @18
  -    ap_set_socketdata   @19
  -    ap_get_polldata   @20
  -    ap_set_polldata   @21
  -    ap_put_os_sock @22
  -    ap_get_os_sock   @23
  -    ap_remove_poll_socket   @24
  -    ap_clear_poll_sockets   @25
  -
  +    ap_getport @13
  +    ap_setport   @14
  +    ap_setup_poll   @15
  +    ap_poll   @16
  +    ap_add_poll_socket   @17
  +    ap_get_revents   @18
  +    ap_get_socketdata   @19
  +    ap_set_socketdata   @20
  +    ap_get_polldata   @21
  +    ap_set_polldata   @22
  +    ap_put_os_sock @23
  +    ap_get_os_sock   @24
  +    ap_remove_poll_socket   @25
  +    ap_clear_poll_sockets   @26
  +    ap_setipaddr @27
  +    ap_getipaddr @28
  
  
  
  1.3       +22 -0     apache-2.0/src/lib/apr/network_io/win32/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sockets.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sockets.c	1999/09/22 17:30:37	1.2
  +++ sockets.c	1999/09/24 18:34:38	1.3
  @@ -146,7 +146,29 @@
       sock->addr->sin_port = htons((short)port);
       return APR_SUCCESS;
   }
  +ap_status_t ap_getport(struct socket_t *sock, ap_uint32_t *port)
  +{
  +    *port = ntohs(sock->addr->sin_port);
  +    return APR_SUCCESS;
  +}
  +ap_status_t ap_setipaddr(struct socket_t *sock, const char *addr)
  +{
  +    if (!strcmp(addr, APR_ANYADDR)) {
  +        sock->addr->sin_addr.s_addr = htonl(INADDR_ANY);
  +        return APR_SUCCESS;
  +    }
   
  +    sock->addr->sin_addr.s_addr = inet_addr(addr);
  +
  +    return APR_SUCCESS;
  +}
  +ap_status_t ap_getipaddr(char *addr, ap_ssize_t len,
  +			 const struct socket_t *sock)
  +{
  +    char *temp = inet_ntoa(sock->addr->sin_addr);
  +    ap_cpystrn(addr,temp,len-1);
  +    return APR_SUCCESS;
  +}
   ap_status_t ap_bind(struct socket_t *sock)
   {
       sock->addr->sin_addr.s_addr = INADDR_ANY;
  
  
  

Mime
View raw message