trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1126862 [4/4] - in /trafficserver/traffic/branches/ssc: iocore/aio/ iocore/cache/ iocore/cluster/ iocore/dns/ iocore/eventsystem/ iocore/hostdb/ iocore/hostdb/include/ iocore/net/ iocore/utils/ lib/records/ lib/ts/ lib/wccp/ mgmt/ mgmt/api...
Date Tue, 24 May 2011 04:11:39 GMT
Modified: trafficserver/traffic/branches/ssc/lib/ts/ink_sock.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/lib/ts/ink_sock.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/lib/ts/ink_sock.cc (original)
+++ trafficserver/traffic/branches/ssc/lib/ts/ink_sock.cc Tue May 24 04:11:36 2011
@@ -164,12 +164,12 @@ safe_ioctl(int fd, int request, char *ar
 }
 
 int
-safe_bind(int s, struct sockaddr *name, int namelen)
+safe_bind(int s, sockaddr_storage const* name, int namelen)
 {
   int r;
   CHECK_PLAUSIBLE_SOCKADDR(name, __FILE__, __LINE__);
   do {
-    r = bind(s, name, namelen);
+    r = bind(s, ink_inet_sa_cast(name), namelen);
   } while (r < 0 && (errno == EAGAIN || errno == EINTR));
   return r;
 }
@@ -185,11 +185,11 @@ safe_listen(int s, int backlog)
 }
 
 int
-safe_getsockname(int s, struct sockaddr *name, int *namelen)
+safe_getsockname(int s, sockaddr_storage *name, int *namelen)
 {
   int r;
   do {
-    r = getsockname(s, name, (socklen_t *) namelen);
+    r = getsockname(s, ink_inet_sa_cast(name), reinterpret_cast<socklen_t *>(namelen));
   } while (r < 0 && (errno == EAGAIN || errno == EINTR));
   return r;
 }

Modified: trafficserver/traffic/branches/ssc/lib/ts/ink_sock.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/lib/ts/ink_sock.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/lib/ts/ink_sock.h (original)
+++ trafficserver/traffic/branches/ssc/lib/ts/ink_sock.h Tue May 24 04:11:36 2011
@@ -37,9 +37,9 @@
 
 int safe_setsockopt(int s, int level, int optname, char *optval, int optlevel);
 int safe_getsockopt(int s, int level, int optname, char *optval, int *optlevel);
-int safe_bind(int s, struct sockaddr *name, int namelen);
+int safe_bind(int s, sockaddr_storage const* name, int namelen);
 int safe_listen(int s, int backlog);
-int safe_getsockname(int s, struct sockaddr *name, int *namelen);
+int safe_getsockname(int s, sockaddr_storage *name, int *namelen);
 
 int safe_fcntl(int fd, int cmd, int arg);
 int safe_ioctl(int fd, int request, char *arg);
@@ -62,5 +62,4 @@ int read_socket(int s, char *buffer, int
 
 inkcoreapi uint32_t ink_inet_addr(const char *s);
 
-
 #endif /* _ink_sock_h_ */

Modified: trafficserver/traffic/branches/ssc/lib/wccp/WccpEndPoint.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/lib/wccp/WccpEndPoint.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/lib/wccp/WccpEndPoint.cc (original)
+++ trafficserver/traffic/branches/ssc/lib/wccp/WccpEndPoint.cc Tue May 24 04:11:36 2011
@@ -58,7 +58,7 @@ Impl::~Impl() {
 
 int
 Impl::open(uint addr) {
-  struct sockaddr saddr;
+  sockaddr_storage saddr;
   sockaddr_in& in_addr = reinterpret_cast<sockaddr_in&>(saddr);
   int fd;
 
@@ -165,7 +165,7 @@ ts::Rv<int>
 Impl::handleMessage() {
   ts::Rv<int> zret;
   ssize_t n; // recv byte count.
-  struct sockaddr src_addr; // sender's address.
+  sockaddr_storage src_addr; // sender's address.
   msghdr recv_hdr;
   iovec recv_buffer;
   IpHeader ip_header;

Modified: trafficserver/traffic/branches/ssc/mgmt/LocalManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/LocalManager.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/LocalManager.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/LocalManager.cc Tue May 24 04:11:36 2011
@@ -400,7 +400,7 @@ void
 LocalManager::initCCom(int port, char *addr, int sport)
 {
   bool found;
-  struct in_addr cluster_addr;  // ip addr of the cluster interface
+  sockaddr_storage cluster_addr;  // ip addr of the cluster interface
   char *clusterAddrStr;         // cluster ip addr as a String
   char *intrName;               // Name of the interface we are to use
   char hostname[1024];          // hostname of this machine
@@ -463,7 +463,7 @@ LocalManager::initMgmtProcessServer()
 {
   char fpath[1024];
   int servlen, one = 1;
-  struct sockaddr_un serv_addr;
+  sockaddr_storage_un serv_addr;
 
 #if TS_HAS_WCCP
   if (wccp_cache.isConfigured()) {
@@ -485,7 +485,7 @@ LocalManager::initMgmtProcessServer()
   serv_addr.sun_family = AF_UNIX;
   ink_strncpy(serv_addr.sun_path, fpath, sizeof(serv_addr.sun_path));
 #if defined(darwin) || defined(freebsd)
-  servlen = sizeof(struct sockaddr_un);
+  servlen = sizeof(sockaddr_storage_un);
 #else
   servlen = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family);
 #endif
@@ -493,7 +493,7 @@ LocalManager::initMgmtProcessServer()
     mgmt_fatal(stderr, "[LocalManager::initMgmtProcessServer] Unable to set socket options.\n");
   }
 
-  if ((bind(process_server_sockfd, (struct sockaddr *) &serv_addr, servlen)) < 0) {
+  if ((bind(process_server_sockfd, (sockaddr_storage *) &serv_addr, servlen)) < 0) {
     mgmt_fatal(stderr, "[LocalManager::initMgmtProcessServer] Unable to bind '%s' socket exiting\n", fpath);
   }
 
@@ -514,7 +514,7 @@ LocalManager::pollMgmtProcessServer()
 {
   int num;
   struct timeval timeout;
-  struct sockaddr_in clientAddr;
+  sockaddr_storage clientAddr;
   fd_set fdlist;
 #if TS_HAS_WCCP
   int wccp_fd = wccp_cache.getSocket();
@@ -552,7 +552,7 @@ LocalManager::pollMgmtProcessServer()
       if (FD_ISSET(process_server_sockfd, &fdlist)) {   /* New connection */
         int clientLen = sizeof(clientAddr);
         int new_sockfd = mgmt_accept(process_server_sockfd,
-                                     (struct sockaddr *) &clientAddr,
+                                     (sockaddr_storage *) &clientAddr,
                                      &clientLen);
         MgmtMessageHdr *mh;
         int data_len;

Modified: trafficserver/traffic/branches/ssc/mgmt/ProcessManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/ProcessManager.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/ProcessManager.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/ProcessManager.cc Tue May 24 04:11:36 2011
@@ -198,7 +198,7 @@ ProcessManager::initLMConnection()
 
 #ifndef _WIN32
   int servlen;
-  struct sockaddr_un serv_addr;
+  sockaddr_storage_un serv_addr;
 
   /* Setup Connection to LocalManager */
   memset((char *) &serv_addr, 0, sizeof(serv_addr));
@@ -219,7 +219,7 @@ ProcessManager::initLMConnection()
     mgmt_fatal(stderr, "[ProcessManager::initLMConnection] Unable to set close-on-exec\n");
   }
 
-  if ((connect(local_manager_sockfd, (struct sockaddr *) &serv_addr, servlen)) < 0) {
+  if ((connect(local_manager_sockfd, (sockaddr_storage *) &serv_addr, servlen)) < 0) {
     mgmt_fatal(stderr, "[ProcessManager::initLMConnection] Connect failed\n");
   }
 

Modified: trafficserver/traffic/branches/ssc/mgmt/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/RecordsConfig.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/RecordsConfig.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/RecordsConfig.cc Tue May 24 04:11:36 2011
@@ -1046,7 +1046,8 @@ RecordElement RecordsConfig[] = {
   ,
   {RECT_CONFIG, "proxy.config.dns.dedicated_thread", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
-
+  {RECT_CONFIG, "proxy.config.dns.prefer_ipv6", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
+  ,
   //##############################################################################
   //#
   //# HostDB

Modified: trafficserver/traffic/branches/ssc/mgmt/api/CoreAPIShared.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/api/CoreAPIShared.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/api/CoreAPIShared.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/api/CoreAPIShared.cc Tue May 24 04:11:36 2011
@@ -248,7 +248,7 @@ connectDirect(const char *host, int port
     goto error;
   }
 #else
-  struct sockaddr_in name;
+  sockaddr_storage name;
   memset((void *) &name, 0, sizeof(sockaddr_in));
 
   int err;
@@ -275,7 +275,7 @@ connectDirect(const char *host, int port
   bcopy(pHostent->h_addr, (caddr_t) & (name.sin_addr), pHostent->h_length);
 
   do {
-    err = connect(sock, (struct sockaddr *) &name, sizeof(name));
+    err = connect(sock, (sockaddr_storage *) &name, sizeof(name));
   } while ((err < 0) && ((errno == EINTR) || (errno == EAGAIN)));
 
   if ((err < 0) && (errno != EINPROGRESS)) {

Modified: trafficserver/traffic/branches/ssc/mgmt/api/EventControlMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/api/EventControlMain.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/api/EventControlMain.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/api/EventControlMain.cc Tue May 24 04:11:36 2011
@@ -64,7 +64,7 @@ new_event_client()
   for (int i = 0; i < NUM_EVENTS; i++)
     ele->events_registered[i] = 0;
 
-  ele->adr = (struct sockaddr *) xmalloc(sizeof(struct sockaddr));
+  ele->adr = (sockaddr_storage *) xmalloc(sizeof(sockaddr_storage));
   if (!ele->adr)
     return NULL;
 
@@ -279,7 +279,7 @@ event_callback_main(void *arg)
   InkHashTableIteratorState con_state;  // used to iterate through hash table
   int fds_ready;                // return value for select go here
   struct timeval timeout;
-  int addr_len = (sizeof(struct sockaddr));
+  int addr_len = (sizeof(sockaddr_storage));
 
   while (1) {
     // LINUX fix: to prevent hard-spin reset timeout on each loop

Modified: trafficserver/traffic/branches/ssc/mgmt/api/EventControlMain.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/api/EventControlMain.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/api/EventControlMain.h (original)
+++ trafficserver/traffic/branches/ssc/mgmt/api/EventControlMain.h Tue May 24 04:11:36 2011
@@ -41,7 +41,7 @@
 typedef struct
 {
   SocketInfo sock_info;         // stores event socket info
-  struct sockaddr *adr;
+  sockaddr_storage *adr;
   bool events_registered[NUM_EVENTS];
 } EventClientT;
 

Modified: trafficserver/traffic/branches/ssc/mgmt/api/TSControlMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/api/TSControlMain.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/api/TSControlMain.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/api/TSControlMain.cc Tue May 24 04:11:36 2011
@@ -64,7 +64,7 @@ create_client()
   if (!ele)
     return NULL;
 
-  ele->adr = (struct sockaddr *) xmalloc(sizeof(struct sockaddr));
+  ele->adr = (sockaddr_storage *) xmalloc(sizeof(sockaddr_storage));
   if (!ele->adr)
     return NULL;
 
@@ -147,7 +147,7 @@ ts_ctrl_main(void *arg)
   InkHashTableIteratorState con_state;  // used to iterate through hash table
   int fds_ready;                // stores return value for select
   struct timeval timeout;
-  int addr_len = (sizeof(struct sockaddr));
+  int addr_len = (sizeof(sockaddr_storage));
 
   // loops until TM dies; waits for and processes requests from clients
   while (1) {

Modified: trafficserver/traffic/branches/ssc/mgmt/api/TSControlMain.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/api/TSControlMain.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/api/TSControlMain.h (original)
+++ trafficserver/traffic/branches/ssc/mgmt/api/TSControlMain.h Tue May 24 04:11:36 2011
@@ -40,7 +40,7 @@
 typedef struct
 {
   SocketInfo sock_info;
-  struct sockaddr *adr;
+  sockaddr_storage *adr;
 } ClientT;
 
 ClientT *create_client();

Modified: trafficserver/traffic/branches/ssc/mgmt/api/remote/NetworkUtilsRemote.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/api/remote/NetworkUtilsRemote.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/api/remote/NetworkUtilsRemote.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/api/remote/NetworkUtilsRemote.cc Tue May 24 04:11:36 2011
@@ -142,8 +142,8 @@ socket_test(int fd)
 TSError
 ts_connect()
 {
-  struct sockaddr_un client_sock;
-  struct sockaddr_un client_event_sock;
+  sockaddr_storage_un client_sock;
+  sockaddr_storage_un client_event_sock;
 
   int sockaddr_len;
 
@@ -167,7 +167,7 @@ ts_connect()
   sockaddr_len = sizeof(client_sock.sun_family) + strlen(client_sock.sun_path);
 #endif
   // connect call
-  if (connect(main_socket_fd, (struct sockaddr *) &client_sock, sockaddr_len) < 0) {
+  if (connect(main_socket_fd, (sockaddr_storage *) &client_sock, sockaddr_len) < 0) {
     //fprintf(stderr, "[connect] ERROR (main_socket_fd %d): %s\n", main_socket_fd, strerror(int(errno)));
     close(main_socket_fd);
     main_socket_fd = -1;
@@ -192,7 +192,7 @@ ts_connect()
   sockaddr_len = sizeof(client_event_sock.sun_family) + strlen(client_event_sock.sun_path);
 #endif
   // connect call
-  if (connect(event_socket_fd, (struct sockaddr *) &client_event_sock, sockaddr_len) < 0) {
+  if (connect(event_socket_fd, (sockaddr_storage *) &client_event_sock, sockaddr_len) < 0) {
     //fprintf(stderr, "[connect] ERROR (event_socket_fd %d): %s\n", event_socket_fd, strerror(int(errno)));
     close(event_socket_fd);
     close(main_socket_fd);

Modified: trafficserver/traffic/branches/ssc/mgmt/cluster/ClusterCom.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/cluster/ClusterCom.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/cluster/ClusterCom.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/cluster/ClusterCom.cc Tue May 24 04:11:36 2011
@@ -60,7 +60,7 @@ drainIncomingChannel(void *arg)
   char message[61440];
   fd_set fdlist;
   void *ret = arg;
-  struct sockaddr_in cli_addr;
+  sockaddr_storage cli_addr;
 
   // Fix for INKqa07688: There was a problem at Genuity where if you
   // pulled out the cable on the cluser interface (or just ifconfig'd
@@ -150,7 +150,7 @@ drainIncomingChannel(void *arg)
     } else if (FD_ISSET(lmgmt->ccom->reliable_server_fd, &fdlist)) {
       /* Reliable(TCP) request */
       int clilen = sizeof(cli_addr);
-      int req_fd = mgmt_accept(lmgmt->ccom->reliable_server_fd, (struct sockaddr *) &cli_addr, &clilen);
+      int req_fd = mgmt_accept(lmgmt->ccom->reliable_server_fd, (sockaddr_storage *) &cli_addr, &clilen);
       if (req_fd < 0) {
         mgmt_elog(stderr, "[drainIncomingChannel] error accepting " "reliable connection\n");
         continue;
@@ -1571,7 +1571,7 @@ void
 ClusterCom::establishChannels()
 {
   int one = 1;
-  struct sockaddr_in serv_addr;
+  sockaddr_storage serv_addr;
 
   if (cluster_type != NO_CLUSTER) {
     establishBroadcastChannel();
@@ -1597,7 +1597,7 @@ ClusterCom::establishChannels()
       serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
       serv_addr.sin_port = htons(reliable_server_port);
 
-      if ((bind(reliable_server_fd, (struct sockaddr *) &serv_addr, sizeof(serv_addr))) < 0) {
+      if ((bind(reliable_server_fd, (sockaddr_storage *) &serv_addr, sizeof(serv_addr))) < 0) {
         mgmt_fatal("[ClusterCom::establishChannels] Unable to bind socket (port:%d)\n", reliable_server_port);
       }
 
@@ -1635,13 +1635,13 @@ ClusterCom::establishBroadcastChannel(vo
   }
   // To fix INKqa04541, we need to explicitly bind the
   // multicast socket to the cluster interface.
-  struct sockaddr_in cluster_intr_addr;
+  sockaddr_storage cluster_intr_addr;
   memset(&cluster_intr_addr, 0, sizeof(cluster_intr_addr));
   cluster_intr_addr.sin_family = AF_INET;
   cluster_intr_addr.sin_addr.s_addr = our_ip;
   cluster_intr_addr.sin_port = htons(mc_port);
 
-  if (bind(broadcast_fd, (struct sockaddr *) &cluster_intr_addr, sizeof(cluster_intr_addr)) < 0) {
+  if (bind(broadcast_fd, (sockaddr_storage *) &cluster_intr_addr, sizeof(cluster_intr_addr)) < 0) {
     mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to bind to socket, port %d\n", mc_port);
   }
 #endif // !_WIN32
@@ -1672,8 +1672,8 @@ ClusterCom::establishBroadcastChannel(vo
   DWORD ttl = mc_ttl;
   BOOL loop = FALSE;
 
-  if (WSAJoinLeaf(broadcast_fd, (struct sockaddr *) &broadcast_addr,
-                  sizeof(struct sockaddr_in), NULL, NULL, NULL, NULL, JL_SENDER_ONLY) == INVALID_SOCKET) {
+  if (WSAJoinLeaf(broadcast_fd, (sockaddr_storage *) &broadcast_addr,
+                  sizeof(sockaddr_storage), NULL, NULL, NULL, NULL, JL_SENDER_ONLY) == INVALID_SOCKET) {
     mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to join group\n");
   }
 
@@ -1760,7 +1760,7 @@ ClusterCom::establishReceiveChannel(int 
 #endif
   receive_addr.sin_port = htons(mc_port);
 
-  if (bind(receive_fd, (struct sockaddr *) &receive_addr, sizeof(receive_addr)) < 0) {
+  if (bind(receive_fd, (sockaddr_storage *) &receive_addr, sizeof(receive_addr)) < 0) {
     if (!fatal_on_error) {
       close(receive_fd);
       receive_fd = -1;
@@ -1785,12 +1785,12 @@ ClusterCom::establishReceiveChannel(int 
     mgmt_fatal("[ClusterCom::establishReceiveChannel] Can't add ourselves to multicast group %s\n", mc_group);
   }
 #else
-  struct sockaddr_in mc_sa;
+  sockaddr_storage mc_sa;
   memset(&mc_sa, 0, sizeof(mc_sa));
   mc_sa.sin_family = AF_INET;
   mc_sa.sin_addr.s_addr = inet_addr(mc_group);
   mc_sa.sin_port = htons(mc_port);
-  if (WSAJoinLeaf(receive_fd, (struct sockaddr *) &mc_sa,
+  if (WSAJoinLeaf(receive_fd, (sockaddr_storage *) &mc_sa,
                   sizeof(mc_sa), NULL, NULL, NULL, NULL, JL_RECEIVER_ONLY) == INVALID_SOCKET) {
     if (!fatal_on_error) {
       close(receive_fd);
@@ -1815,7 +1815,7 @@ ClusterCom::establishReceiveChannel(int 
 bool
 ClusterCom::sendOutgoingMessage(char *buf, int len)
 {
-  if (mgmt_sendto(broadcast_fd, buf, len, 0, (struct sockaddr *) &broadcast_addr, sizeof(broadcast_addr)) < 0) {
+  if (mgmt_sendto(broadcast_fd, buf, len, 0, (sockaddr_storage *) &broadcast_addr, sizeof(broadcast_addr)) < 0) {
     mgmt_elog("[ClusterCom::sendOutgoingMessage] Message send failed\n");
     return false;
   }
@@ -1907,7 +1907,7 @@ ClusterCom::rl_sendReliableMessage(unsig
 {
   int fd, cport;
   char string_addr[80];
-  struct sockaddr_in serv_addr;
+  sockaddr_storage serv_addr;
   struct in_addr address;
   InkHashTableValue hash_value;
 
@@ -1937,7 +1937,7 @@ ClusterCom::rl_sendReliableMessage(unsig
   }
 #endif
 
-  if (connect(fd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
+  if (connect(fd, (sockaddr_storage *) &serv_addr, sizeof(serv_addr)) < 0) {
     mgmt_elog("[ClusterCom::rl_sendReliableMessage] Unable to connect to peer\n");
     close_socket(fd);
     return false;
@@ -1962,7 +1962,7 @@ ClusterCom::sendReliableMessage(unsigned
 {
   int fd, cport;
   char string_addr[80];
-  struct sockaddr_in serv_addr;
+  sockaddr_storage serv_addr;
   struct in_addr address;
   InkHashTableValue hash_value;
 
@@ -2002,7 +2002,7 @@ ClusterCom::sendReliableMessage(unsigned
   }
 #endif
 
-  if (connect(fd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
+  if (connect(fd, (sockaddr_storage *) &serv_addr, sizeof(serv_addr)) < 0) {
     mgmt_elog("[ClusterCom::sendReliableMessage] Unable to connect to peer\n");
     if (take_lock) {
       ink_mutex_release(&mutex);
@@ -2048,7 +2048,7 @@ ClusterCom::sendReliableMessageReadTillC
 {
   int fd, cport, res;
   char string_addr[80], tmp_reply[1024];
-  struct sockaddr_in serv_addr;
+  sockaddr_storage serv_addr;
   struct in_addr address;
   InkHashTableValue hash_value;
 
@@ -2080,7 +2080,7 @@ ClusterCom::sendReliableMessageReadTillC
   }
 #endif
 
-  if (connect(fd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
+  if (connect(fd, (sockaddr_storage *) &serv_addr, sizeof(serv_addr)) < 0) {
     mgmt_elog("[ClusterCom::sendReliableMessageReadTillClose] Unable to connect\n");
     ink_mutex_release(&mutex);
     close_socket(fd);
@@ -2129,7 +2129,7 @@ ClusterCom::receiveIncomingMessage(char 
 {
   int nbytes = 0, addr_len = sizeof(receive_addr);
 
-  if ((nbytes = recvfrom(receive_fd, buf, max, 0, (struct sockaddr *) &receive_addr, (socklen_t *) & addr_len)) < 0) {
+  if ((nbytes = recvfrom(receive_fd, buf, max, 0, (sockaddr_storage *) &receive_addr, (socklen_t *) & addr_len)) < 0) {
     mgmt_elog(stderr, "[ClusterCom::receiveIncomingMessage] Receive failed\n");
   }
   return nbytes;

Modified: trafficserver/traffic/branches/ssc/mgmt/cluster/ClusterCom.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/cluster/ClusterCom.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/cluster/ClusterCom.h (original)
+++ trafficserver/traffic/branches/ssc/mgmt/cluster/ClusterCom.h Tue May 24 04:11:36 2011
@@ -176,8 +176,8 @@ public:
   int mc_ttl;
   char mc_group[MAX_MC_GROUP_LEN];
 
-  struct sockaddr_in broadcast_addr;
-  struct sockaddr_in receive_addr;
+  sockaddr_storage broadcast_addr;
+  sockaddr_storage receive_addr;
 
 };                              /* End class ClusterCom */
 

Modified: trafficserver/traffic/branches/ssc/mgmt/cluster/VMap.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/cluster/VMap.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/cluster/VMap.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/cluster/VMap.cc Tue May 24 04:11:36 2011
@@ -167,7 +167,7 @@ VMap::VMap(char *interface, unsigned lon
   }
   {
     int tmp_socket;
-    struct sockaddr_in *tmp;    // a tmp ptr for addresses
+    sockaddr_storage *tmp;    // a tmp ptr for addresses
     struct ifconf ifc;          // ifconf information
     char *ifbuf;                // ifconf buffer
     struct ifreq *ifr, *ifend;  // pointer to individual inferface info
@@ -218,7 +218,7 @@ VMap::VMap(char *interface, unsigned lon
           if (ifr->ifr_ifru.ifru_addr.sa_family == AF_INET) {
             RealIPInfo *tmp_realip_info;
 
-            tmp = (struct sockaddr_in *) &ifr->ifr_ifru.ifru_addr;
+            tmp = (sockaddr_storage *) &ifr->ifr_ifru.ifru_addr;
 
             ink_assert((tmp_realip_info = (RealIPInfo *) xmalloc(sizeof(RealIPInfo))));
             tmp_realip_info->real_ip = tmp->sin_addr;

Modified: trafficserver/traffic/branches/ssc/mgmt/preparse/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/preparse/Makefile.am?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/preparse/Makefile.am (original)
+++ trafficserver/traffic/branches/ssc/mgmt/preparse/Makefile.am Tue May 24 04:11:36 2011
@@ -15,7 +15,8 @@
 #  limitations under the License.
 
 AM_CPPFLAGS = \
-  -I$(top_srcdir)/proxy/hdrs
+  -I$(top_srcdir)/proxy/hdrs \
+  -I$(top_srcdir)/lib
 
 MGMT_DEFS = @MGMT_DEFS@
 DEFS += $(MGMT_DEFS)
@@ -23,8 +24,6 @@ DEFS += $(MGMT_DEFS)
 noinst_LIBRARIES = libpreparse.a
 
 libpreparse_a_SOURCES = \
-  IPRange.cc \
-  IPRange.h \
   RemapReadConfig.cc \
   SocksParser.cc \
   StoreReadConfig.cc

Modified: trafficserver/traffic/branches/ssc/mgmt/utils/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/utils/Makefile.am?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/utils/Makefile.am (original)
+++ trafficserver/traffic/branches/ssc/mgmt/utils/Makefile.am Tue May 24 04:11:36 2011
@@ -24,9 +24,7 @@ AM_CPPFLAGS = \
   -I$(top_srcdir)/mgmt/api/include \
   -I$(top_srcdir)/mgmt/cluster \
   -I$(top_srcdir)/mgmt/web2 \
-  -I$(top_srcdir)/lib/tsconfig \
   -I$(top_srcdir)/proxy \
-  -I$(top_srcdir)/lib/records \
   -I$(top_srcdir)/lib
 
 MGMT_DEFS = @MGMT_DEFS@
@@ -45,8 +43,6 @@ libutils_lm_a_SOURCES = \
   EnvBlock.h \
   ExpandingArray.cc \
   ExpandingArray.h \
-  IpLookup.cc \
-  IpLookup.h \
   MgmtSchema.cc \
   MgmtSchema.h \
   MgmtUtils.cc \
@@ -57,8 +53,6 @@ libutils_lm_a_SOURCES = \
   XmlUtils.h
 
 libutils_p_a_SOURCES = \
-  IpLookup.cc \
-  IpLookup.h \
   MgmtUtils.cc \
   MgmtUtils.h \
   XmlUtils.cc \

Modified: trafficserver/traffic/branches/ssc/mgmt/utils/MgmtSocket.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/utils/MgmtSocket.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/utils/MgmtSocket.h (original)
+++ trafficserver/traffic/branches/ssc/mgmt/utils/MgmtSocket.h Tue May 24 04:11:36 2011
@@ -59,7 +59,7 @@ mgmt_transient_error()
 //-------------------------------------------------------------------------
 
 inline int
-mgmt_accept(int s, struct sockaddr *addr, int *addrlen)
+mgmt_accept(int s, sockaddr_storage *addr, int *addrlen)
 {
   int r, retries;
   for (retries = 0; retries < MGMT_MAX_TRANSIENT_ERRORS; retries++) {
@@ -165,7 +165,7 @@ mgmt_select(int nfds, fd_set * readfds, 
 //-------------------------------------------------------------------------
 
 inline int
-mgmt_sendto(int fd, void *buf, int len, int flags, struct sockaddr *to, int tolen)
+mgmt_sendto(int fd, void *buf, int len, int flags, sockaddr_storage *to, int tolen)
 {
   int r, retries;
   for (retries = 0; retries < MGMT_MAX_TRANSIENT_ERRORS; retries++) {

Modified: trafficserver/traffic/branches/ssc/mgmt/utils/MgmtUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/utils/MgmtUtils.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/utils/MgmtUtils.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/utils/MgmtUtils.cc Tue May 24 04:11:36 2011
@@ -592,7 +592,7 @@ get_interface_mtu(int sock_fd, struct if
 #endif
 
 bool
-mgmt_getAddrForIntr(char *intrName, struct in_addr * addr, int *mtu)
+mgmt_getAddrForIntr(char *intrName, sockaddr_storage * addr, int *mtu)
 {
   bool found = false;
 
@@ -602,7 +602,6 @@ mgmt_getAddrForIntr(char *intrName, stru
 #if !defined(_WIN32)
 
   int fakeSocket;               // a temporary socket to pass to ioctl
-  struct sockaddr_in *tmp;      // a tmp ptr for addresses
   struct ifconf ifc;            // ifconf information
   char *ifbuf;                  // ifconf buffer
   struct ifreq *ifr, *ifend;    // pointer to individual inferface info
@@ -652,8 +651,7 @@ mgmt_getAddrForIntr(char *intrName, stru
       } else {
         // Only look at the address if it an internet address
         if (ifr->ifr_ifru.ifru_addr.sa_family == AF_INET) {
-          tmp = (struct sockaddr_in *) &ifr->ifr_ifru.ifru_addr;
-          *addr = tmp->sin_addr;
+          ink_inet_test_copy(addr, ink_inet_ss_cast(&ifr->ifr_ifru.ifru_addr));
           found = true;
 
           if (mtu)

Modified: trafficserver/traffic/branches/ssc/mgmt/utils/MgmtUtils.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/utils/MgmtUtils.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/utils/MgmtUtils.h (original)
+++ trafficserver/traffic/branches/ssc/mgmt/utils/MgmtUtils.h Tue May 24 04:11:36 2011
@@ -38,7 +38,7 @@
 #include "ink_bool.h"
 #include "Diags.h"
 
-#include "P_RecCore.h"
+#include <records/P_RecCore.h>
 
 void mgmt_blockAllSigs();
 
@@ -58,7 +58,7 @@ void mgmt_cleanup();
 
 struct in_addr *mgmt_sortipaddrs(int num, struct in_addr **list);
 char *mgmt_localhost_ip();
-bool mgmt_getAddrForIntr(char *intrName, struct in_addr *addr, int *mtu = 0);
+bool mgmt_getAddrForIntr(char *intrName, sockaddr_storage *addr, int *mtu = 0);
 
 /* the following functions are all DEPRECATED.  The Diags
    interface should be used exclusively in the future */

Modified: trafficserver/traffic/branches/ssc/mgmt/web2/WebGlobals.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/web2/WebGlobals.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/web2/WebGlobals.h (original)
+++ trafficserver/traffic/branches/ssc/mgmt/web2/WebGlobals.h Tue May 24 04:11:36 2011
@@ -46,11 +46,6 @@
 #include "ink_mutex.h"
 #include "MgmtHashTable.h"
 
-extern "C"
-{
-  struct sockaddr_in;
-}
-
 // DG: Added NO_THR state for init in compile warning
 enum UIthr_t
 {
@@ -68,7 +63,7 @@ struct serviceThr_t
   UIthr_t type;
   bool waitingForJoin;
   bool alreadyShutdown;
-  struct sockaddr_in *clientInfo;
+  sockaddr_storage *clientInfo;
 #ifdef MGMT_WEB_TUNE
   WebTune *timing;
   int xactNumber;

Modified: trafficserver/traffic/branches/ssc/mgmt/web2/WebIntrMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/mgmt/web2/WebIntrMain.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/mgmt/web2/WebIntrMain.cc (original)
+++ trafficserver/traffic/branches/ssc/mgmt/web2/WebIntrMain.cc Tue May 24 04:11:36 2011
@@ -158,7 +158,7 @@ static fd
 newUNIXsocket(char *fpath)
 {
   // coverity[var_decl]
-  struct sockaddr_un serv_addr;
+  sockaddr_storage_un serv_addr;
   int servlen;
   fd socketFD;
   int one = 1;
@@ -174,7 +174,7 @@ newUNIXsocket(char *fpath)
   serv_addr.sun_family = AF_UNIX;
   ink_strncpy(serv_addr.sun_path, fpath, sizeof(serv_addr.sun_path));
 #if defined(darwin) || defined(freebsd)
-  servlen = sizeof(struct sockaddr_un);
+  servlen = sizeof(sockaddr_storage_un);
 #else
   servlen = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family);
 #endif
@@ -182,7 +182,7 @@ newUNIXsocket(char *fpath)
     mgmt_log(stderr, "[newUNIXsocket] Unable to set socket options: %s\n", strerror(errno));
   }
 
-  if ((bind(socketFD, (struct sockaddr *) &serv_addr, servlen)) < 0) {
+  if ((bind(socketFD, (sockaddr_storage *) &serv_addr, servlen)) < 0) {
     mgmt_log(stderr, "[newUNIXsocket] Unable to bind socket: %s\n", strerror(errno));
     close_socket(socketFD);
     return -1;
@@ -220,7 +220,7 @@ newUNIXsocket(char *fpath)
 static fd
 newTcpSocket(int port)
 {
-  struct sockaddr_in socketInfo;
+  sockaddr_storage socketInfo;
   fd socketFD;
   int one = 1;
 
@@ -333,7 +333,7 @@ webIntr_main(void *x)
   fd acceptFD = 0;              // FD that is ready for accept
   UIthr_t serviceThr = NO_THR;  // type for new service thread
 
-  struct sockaddr_in *clientInfo;       // Info about client connection
+  sockaddr_storage *clientInfo;       // Info about client connection
   ink_thread thrId;             // ID of service thread we just spawned
   fd_set selectFDs;             // FD set passed to select
   int publicPort = -1;          // Port for incoming autoconf connections
@@ -506,8 +506,8 @@ webIntr_main(void *x)
     ink_atomic_increment((int32_t *) & numServiceThr, 1);
 
     // coverity[alloc_fn]
-    clientInfo = (struct sockaddr_in *) xmalloc(sizeof(struct sockaddr_in));
-    addrLen = sizeof(struct sockaddr_in);
+    clientInfo = (sockaddr_storage *) xmalloc(sizeof(sockaddr_storage));
+    addrLen = sizeof(sockaddr_storage);
 
     // coverity[noescape]
     if ((clientFD = mgmt_accept(acceptFD, (sockaddr *) clientInfo, &addrLen)) < 0) {

Modified: trafficserver/traffic/branches/ssc/proxy/ControlMatcher.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/ControlMatcher.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/ControlMatcher.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/ControlMatcher.h Tue May 24 04:11:36 2011
@@ -98,7 +98,7 @@
 #endif
 
 #include "DynArray.h"
-#include "IpLookup.h"
+#include <ts/IpMap.h>
 
 #include "ink_port.h"
 #include "HTTP.h"
@@ -143,16 +143,18 @@ public:
 
   HttpRequestData()
     : hdr(NULL), hostname_str(NULL), api_info(NULL),
-      xact_start(0), src_ip(0), dest_ip(0), incoming_port(0), tag(NULL)
-  { }
+      xact_start(0), tag(NULL)
+  {
+    ink_inet_invalidate(src_ip);
+    ink_inet_invalidate(dest_ip);
+  }
 
   HTTPHdr *hdr;
   char *hostname_str;
   _HttpApiInfo *api_info;
   time_t xact_start;
-  ip_addr_t src_ip;
-  ip_addr_t dest_ip;
-  uint16_t incoming_port;
+  sockaddr_storage src_ip;
+  sockaddr_storage dest_ip;
   char *tag;
 };
 
@@ -243,7 +245,7 @@ public:
   //private:
   //void MatchArray(ip_addr_t addr, RD* rdata, Result* result, void* array);
   static void PrintFunc(void *opaque_data);
-  IpLookup *ip_lookup;          // Data structure to do lookups
+  IpMap *ip_lookup;          // Data structure to do lookups
   Data *data_array;             // array of the data lements with in the table
   int array_len;                // size of the arrays
   int num_el;                   // number of elements in the table

Modified: trafficserver/traffic/branches/ssc/proxy/ICP.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/ICP.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/ICP.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/ICP.cc Tue May 24 04:11:36 2011
@@ -594,7 +594,7 @@ ICPPeerReadCont::PeerReadStateMachine(Pe
         ink_assert(s->_peer->readAction == NULL);
         Action *a = s->_peer->RecvFrom_re(this, this, buf,
                                           buf->write_avail() - 1,
-                                          (struct sockaddr *)
+                                          (sockaddr_storage *)
                                           &s->_peer->fromaddr,
                                           &s->_peer->fromaddrlen);
         if (!a) {
@@ -688,7 +688,7 @@ ICPPeerReadCont::PeerReadStateMachine(Pe
         }
         // Validate receiver and convert the received sockaddr
         //   to internal sockaddr format.
-        struct sockaddr_in from;
+        sockaddr_storage from;
         if (!s->_peer->ExtToIntRecvSockAddr(&s->_peer->fromaddr, &from)) {
           int status;
           ICPConfigData *cfg = _ICPpr->GetConfig()->globalConfig();
@@ -1324,7 +1324,7 @@ ICPRequestCont::ICPStateMachine(int even
           npending_actions++;
           Action *a = P->SendMsg_re(this,
                                     P,
-                                    &_sendMsgHdr, (struct sockaddr_in *) 0);
+                                    &_sendMsgHdr, (sockaddr_storage *) 0);
           if (!a) {
             a = ACTION_IO_ERROR;
           }
@@ -1335,7 +1335,7 @@ ICPRequestCont::ICPStateMachine(int even
               }
               (*pendingActions) (npending_actions) = a;
             }
-            P->LogSendMsg(&_ICPmsg, (struct sockaddr_in *) 0);  // log as send query
+            P->LogSendMsg(&_ICPmsg, (sockaddr_storage *) 0);  // log as send query
             Debug("icp", "[ICP_QUEUE_REQUEST] Id=%d send query to [%s:%d]",
                   _sequence_number, inet_ntoa(*P->GetIP()), P->GetPort());
           } else {

Modified: trafficserver/traffic/branches/ssc/proxy/ICP.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/ICP.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/ICP.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/ICP.h Tue May 24 04:11:36 2011
@@ -510,17 +510,17 @@ public:
   // Pure virtual functions
   virtual struct in_addr *GetIP() = 0;
   virtual int GetPort() = 0;
-  virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, struct sockaddr_in *to) = 0;
-  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr *, socklen_t *) = 0;
+  virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, sockaddr_storage *to) = 0;
+  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, sockaddr_storage *, socklen_t *) = 0;
   virtual int GetRecvFD() = 0;
   virtual int GetSendFD() = 0;
   virtual int ExpectedReplies(BitMap *) = 0;
-  virtual int ValidSender(struct sockaddr_in *) = 0;
-  virtual void LogSendMsg(ICPMsg_t *, struct sockaddr_in *) = 0;
+  virtual int ValidSender(sockaddr_storage *) = 0;
+  virtual void LogSendMsg(ICPMsg_t *, sockaddr_storage *) = 0;
   virtual int IsOnline() = 0;
   virtual Connection *GetSendChan() = 0;
   virtual Connection *GetRecvChan() = 0;
-  virtual int ExtToIntRecvSockAddr(struct sockaddr_in *, struct sockaddr_in *) = 0;
+  virtual int ExtToIntRecvSockAddr(sockaddr_storage *, sockaddr_storage *) = 0;
 
   enum
   { OFFLINE_THRESHOLD = 20 };
@@ -569,7 +569,7 @@ public:
   // these shouldn't be public
   // this is for delayed I/O
   Ptr<IOBufferBlock> buf;
-  struct sockaddr_in fromaddr;
+  sockaddr_storage fromaddr;
   socklen_t fromaddrlen;
   int notFirstRead;             // priming the reads
   Action *readAction;           // outstanding read
@@ -616,14 +616,14 @@ public:
   int GetProxyPort();
   virtual struct in_addr *GetIP();
   virtual int GetPort();
-  virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, struct sockaddr_in *to);
-  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr *, socklen_t *);
+  virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, sockaddr_storage *to);
+  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, sockaddr_storage *, socklen_t *);
   virtual int GetRecvFD();
   virtual int GetSendFD();
   virtual int ExpectedReplies(BitMap *);
-  virtual int ValidSender(struct sockaddr_in *);
-  virtual void LogSendMsg(ICPMsg_t *, struct sockaddr_in *);
-  virtual int ExtToIntRecvSockAddr(struct sockaddr_in *in, struct sockaddr_in *out);
+  virtual int ValidSender(sockaddr_storage *);
+  virtual void LogSendMsg(ICPMsg_t *, sockaddr_storage *);
+  virtual int ExtToIntRecvSockAddr(sockaddr_storage *in, sockaddr_storage *out);
   inline virtual int IsOnline()
   {
     return 1;
@@ -667,13 +667,13 @@ public:
 
   virtual struct in_addr *GetIP();
   virtual int GetPort();
-  virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, struct sockaddr_in *to);
-  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr *, socklen_t *);
+  virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, sockaddr_storage *to);
+  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, sockaddr_storage *, socklen_t *);
   virtual int GetRecvFD();
   virtual int GetSendFD();
   virtual int ExpectedReplies(BitMap *);
-  virtual int ValidSender(struct sockaddr_in *);
-  virtual void LogSendMsg(ICPMsg_t *, struct sockaddr_in *);
+  virtual int ValidSender(sockaddr_storage *);
+  virtual void LogSendMsg(ICPMsg_t *, sockaddr_storage *);
   virtual int IsOnline();
   inline virtual Connection *GetRecvChan()
   {
@@ -683,7 +683,7 @@ public:
   {
     return &_send_chan;
   }
-  inline virtual int ExtToIntRecvSockAddr(struct sockaddr_in *in, struct sockaddr_in *out)
+  inline virtual int ExtToIntRecvSockAddr(sockaddr_storage *in, sockaddr_storage *out)
   {
     Peer *P = FindMultiCastChild(&in->sin_addr, 0);
     if (P) {
@@ -702,7 +702,7 @@ private:
   //---------------------------
   // Multicast specific data
   //---------------------------
-  struct sockaddr_in _mc_addr;
+  sockaddr_storage _mc_addr;
   int _mc_ttl;
   struct multicast_data
   {
@@ -1066,7 +1066,7 @@ public:
       Ptr<IOBufferBlock> _buf;       // the buffer with the ICP message in it
     ICPMsg_t *_rICPmsg;
     int _rICPmsg_len;
-    struct sockaddr_in _sender; // sender of rICPmsg
+    sockaddr_storage _sender; // sender of rICPmsg
     URL _cachelookupURL;
     int _queryResult;
     ICPRequestCont *_ICPReqCont;
@@ -1188,7 +1188,7 @@ private:
   URL *_url;
 
   // Return data
-  struct sockaddr_in _ret_sockaddr;
+  sockaddr_storage _ret_sockaddr;
   ICPreturn_t _ret_status;
   class Action _act;
 

Modified: trafficserver/traffic/branches/ssc/proxy/ICPConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/ICPConfig.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/ICPConfig.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/ICPConfig.cc Tue May 24 04:11:36 2011
@@ -860,7 +860,7 @@ ParentSiblingPeer::GetPort()
 }
 
 Action *
-ParentSiblingPeer::SendMsg_re(Continuation * cont, void *token, struct msghdr * msg, struct sockaddr_in * to)
+ParentSiblingPeer::SendMsg_re(Continuation * cont, void *token, struct msghdr * msg, sockaddr_storage * to)
 {
   // Note: All sends are funneled through the local peer UDP socket.
 
@@ -886,7 +886,7 @@ ParentSiblingPeer::SendMsg_re(Continuati
 
 Action *
 ParentSiblingPeer::RecvFrom_re(Continuation * cont, void *token,
-                               IOBufferBlock * bufblock, int size, struct sockaddr * from, socklen_t *fromlen)
+                               IOBufferBlock * bufblock, int size, sockaddr_storage * from, socklen_t *fromlen)
 {
   // Note: All receives are funneled through the local peer UDP socket.
 
@@ -929,7 +929,7 @@ ParentSiblingPeer::ExpectedReplies(BitMa
 }
 
 int
-ParentSiblingPeer::ValidSender(struct sockaddr_in *fr)
+ParentSiblingPeer::ValidSender(sockaddr_storage *fr)
 {
   if (_type == PEER_LOCAL) {
     //
@@ -957,7 +957,7 @@ ParentSiblingPeer::ValidSender(struct so
 }
 
 void
-ParentSiblingPeer::LogSendMsg(ICPMsg_t * m, struct sockaddr_in *sa)
+ParentSiblingPeer::LogSendMsg(ICPMsg_t * m, sockaddr_storage *sa)
 {
   NOWARN_UNUSED(sa);
   // Note: ICPMsg_t (m) is in network byte order
@@ -969,12 +969,12 @@ ParentSiblingPeer::LogSendMsg(ICPMsg_t *
 }
 
 int
-ParentSiblingPeer::ExtToIntRecvSockAddr(struct sockaddr_in *in, struct sockaddr_in *out)
+ParentSiblingPeer::ExtToIntRecvSockAddr(sockaddr_storage *in, sockaddr_storage *out)
 {
   Peer *p = _ICPpr->FindPeer(&in->sin_addr, -1);        // ignore port
   if (p && (p->GetType() != PEER_LOCAL)) {
     // Map from received (ip, port) to defined (ip, port).
-    struct sockaddr_in s;
+    sockaddr_storage s;
     memset((void *) &s, 0, sizeof(s));
     s.sin_port = htons(p->GetPort());
     s.sin_addr = *p->GetIP();
@@ -1018,7 +1018,7 @@ MultiCastPeer::GetPort()
 }
 
 Action *
-MultiCastPeer::SendMsg_re(Continuation * cont, void *token, struct msghdr * msg, struct sockaddr_in * to)
+MultiCastPeer::SendMsg_re(Continuation * cont, void *token, struct msghdr * msg, sockaddr_storage * to)
 {
   Action *a;
 
@@ -1038,7 +1038,7 @@ MultiCastPeer::SendMsg_re(Continuation *
 
 Action *
 MultiCastPeer::RecvFrom_re(Continuation * cont, void *token,
-                           IOBufferBlock * bufblock, int len, struct sockaddr * from, socklen_t *fromlen)
+                           IOBufferBlock * bufblock, int len, sockaddr_storage * from, socklen_t *fromlen)
 {
   NOWARN_UNUSED(bufblock);
   Action *a = udpNet.recvfrom_re(cont, token,
@@ -1075,7 +1075,7 @@ MultiCastPeer::ExpectedReplies(BitMap * 
 }
 
 int
-MultiCastPeer::ValidSender(struct sockaddr_in *sa)
+MultiCastPeer::ValidSender(sockaddr_storage *sa)
 {
   // TBD: Use hash function
   // Make sure sockaddr_in corresponds to a defined peer in the
@@ -1093,7 +1093,7 @@ MultiCastPeer::ValidSender(struct sockad
 }
 
 void
-MultiCastPeer::LogSendMsg(ICPMsg_t * m, struct sockaddr_in *sa)
+MultiCastPeer::LogSendMsg(ICPMsg_t * m, sockaddr_storage *sa)
 {
   // Note: ICPMsg_t (m) is in network byte order
   if (sa) {

Modified: trafficserver/traffic/branches/ssc/proxy/ICPProcessor.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/ICPProcessor.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/ICPProcessor.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/ICPProcessor.h Tue May 24 04:11:36 2011
@@ -55,9 +55,9 @@ class ICPProcessor;
 //
 //      Action * icpProcessor.ICPQuery(Continuation *, URL *)
 //        Returns:
-//          Invokes continuation handleEvent(ICPreturn_t, struct sockaddr_in *)
+//          Invokes continuation handleEvent(ICPreturn_t, sockaddr_storage *)
 //          where ICPreturn_t is ICP_LOOKUP_FOUND or ICP_LOOKUP_FAILED and
-//          struct sockaddr_in (ip,port) is host containing URL data.
+//          sockaddr_storage (ip,port) is host containing URL data.
 //***************************************************************************
 class ICPProcessorExt
 {

Modified: trafficserver/traffic/branches/ssc/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/InkAPI.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/InkAPI.cc Tue May 24 04:11:36 2011
@@ -5077,7 +5077,7 @@ TSHttpTxnTransformRespGet(TSHttpTxn txnp
   return TS_ERROR;
 }
 
-const struct sockaddr_storage *
+const sockaddr_storage *
 TSHttpTxnClientSockAddrGet(TSHttpTxn txnp)
 {
   sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
@@ -5116,7 +5116,7 @@ TSHttpTxnServerIPGet(TSHttpTxn txnp)
 // This API does currently not use or honor the port specified in the sockaddr.
 // This could change in a future version, but for now, leave it at 0 (or undef).
 TSReturnCode
-TSHttpTxnOutgoingAddrSet(TSHttpTxn txnp, const struct sockaddr *addr, socklen_t addrlen)
+TSHttpTxnOutgoingAddrSet(TSHttpTxn txnp, const sockaddr_storage *addr, socklen_t addrlen)
 {
   sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
   HttpSM *sm = (HttpSM *) txnp;
@@ -5124,12 +5124,12 @@ TSHttpTxnOutgoingAddrSet(TSHttpTxn txnp,
   sm->t_state.setup_per_txn_configs(); // Make sure the txn_conf struct is setup
 
   // TODO: For now only, we really ought to make all "internal" IP representations
-  // use struct sockaddr_storage.
+  // use sockaddr_storage.
   switch (addr->sa_family) {
   case AF_INET:
     {
-      sdk_assert(addrlen >= sizeof(struct sockaddr_in));
-      const struct sockaddr_in *v4addr = reinterpret_cast<const struct sockaddr_in *>(addr);
+      sdk_assert(addrlen >= sizeof(sockaddr_storage));
+      const sockaddr_storage *v4addr = reinterpret_cast<const sockaddr_storage *>(addr);
       sm->t_state.txn_conf->outgoing_ip_to_bind_saddr = v4addr->sin_addr.s_addr;
 
       return TS_SUCCESS;

Modified: trafficserver/traffic/branches/ssc/proxy/MuxVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/MuxVC.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/MuxVC.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/MuxVC.cc Tue May 24 04:11:36 2011
@@ -492,13 +492,13 @@ MuxClientVC::get_socket()
   return 0;
 }
 
-const struct sockaddr_in &
+const sockaddr_storage &
 MuxClientVC::get_local_addr()
 {
   return mux_vc->local_addr;
 }
 
-const struct sockaddr_in &
+const sockaddr_storage &
 MuxClientVC::get_remote_addr()
 {
   return mux_vc->remote_addr;

Modified: trafficserver/traffic/branches/ssc/proxy/MuxVC.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/MuxVC.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/MuxVC.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/MuxVC.h Tue May 24 04:11:36 2011
@@ -135,8 +135,8 @@ public:
 
   // Pure virutal functions we need to compile
   SOCKET get_socket();
-  const struct sockaddr_in &get_local_addr();
-  const struct sockaddr_in &get_remote_addr();
+  const sockaddr_storage &get_local_addr();
+  const sockaddr_storage &get_remote_addr();
   unsigned int get_local_ip();
   int get_local_port();
   unsigned int get_remote_ip();
@@ -312,8 +312,8 @@ private:
 
   Action return_accept_action;
 
-  struct sockaddr_in local_addr;
-  struct sockaddr_in remote_addr;
+  sockaddr_storage local_addr;
+  sockaddr_storage remote_addr;
 
   int next_client_id;
   int num_clients;

Modified: trafficserver/traffic/branches/ssc/proxy/ParentSelection.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/ParentSelection.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/ParentSelection.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/ParentSelection.h Tue May 24 04:11:36 2011
@@ -38,7 +38,7 @@
 
 #include "ink_apidefs.h"
 
-#include "P_RecProcess.h"
+#include <records/P_RecProcess.h>
 
 struct RequestData;
 typedef RequestData RD;

Modified: trafficserver/traffic/branches/ssc/proxy/PluginVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/PluginVC.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/PluginVC.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/PluginVC.cc Tue May 24 04:11:36 2011
@@ -1126,15 +1126,15 @@ PluginVCCore::kill_no_connect()
 void
 PluginVCCore::set_passive_addr(uint32_t ip, int port)
 {
-  ((struct sockaddr_in *)&(passive_addr_struct))->sin_addr.s_addr = htonl(ip);
-  ((struct sockaddr_in *)&(passive_addr_struct))->sin_port = htons(port);
+  ((sockaddr_storage *)&(passive_addr_struct))->sin_addr.s_addr = htonl(ip);
+  ((sockaddr_storage *)&(passive_addr_struct))->sin_port = htons(port);
 }
 
 void
 PluginVCCore::set_active_addr(uint32_t ip, int port)
 {
-  ((struct sockaddr_in *)&(active_addr_struct))->sin_addr.s_addr = htonl(ip);
-  ((struct sockaddr_in *)&(active_addr_struct))->sin_port = htons(port);
+  ((sockaddr_storage *)&(active_addr_struct))->sin_addr.s_addr = htonl(ip);
+  ((sockaddr_storage *)&(active_addr_struct))->sin_port = htons(port);
 }
 
 void

Modified: trafficserver/traffic/branches/ssc/proxy/PluginVC.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/PluginVC.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/PluginVC.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/PluginVC.h Tue May 24 04:11:36 2011
@@ -200,8 +200,8 @@ private:
   MIOBuffer *a_to_p_buffer;
   IOBufferReader *a_to_p_reader;
 
-  struct sockaddr_storage passive_addr_struct;
-  struct sockaddr_storage active_addr_struct;
+  sockaddr_storage passive_addr_struct;
+  sockaddr_storage active_addr_struct;
 
   void *passive_data;
   void *active_data;
@@ -224,8 +224,8 @@ passive_data(NULL),
 active_data(NULL),
 id(0)
 {
-  memset(&active_addr_struct, 0, sizeof(struct sockaddr_storage));
-  memset(&passive_addr_struct, 0, sizeof(struct sockaddr_storage));
+  memset(&active_addr_struct, 0, sizeof(sockaddr_storage));
+  memset(&passive_addr_struct, 0, sizeof(sockaddr_storage));
 
   id = ink_atomic_increment(&nextid, 1);
 }

Modified: trafficserver/traffic/branches/ssc/proxy/Prefetch.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/Prefetch.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/Prefetch.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/Prefetch.cc Tue May 24 04:11:36 2011
@@ -891,7 +891,7 @@ PrefetchUrlBlaster::udpUrlBlaster(int ev
         setup_udp_header(block->start(), get_udp_seq_no(), 0, true);
         setup_object_header(block->start() + PRELOAD_UDP_HEADER_LEN, block->read_avail() - PRELOAD_UDP_HEADER_LEN, true);
 
-        struct sockaddr_in saddr;
+        sockaddr_storage saddr;
         saddr.sin_family = AF_INET;
         saddr.sin_port = htons(prefetch_config.stuffer_port);
         if (url_head->url_multicast_ip)
@@ -1682,7 +1682,7 @@ PrefetchBlaster::blastObject(int event, 
 
       setup_udp_header(io_block->start(), seq_no, n_pkts_sent++, (towrite >= nread_avail));
 
-      struct sockaddr_in saddr;
+      sockaddr_storage saddr;
       saddr.sin_family = AF_INET;
       saddr.sin_port = htons(prefetch_config.stuffer_port);
       saddr.sin_addr.s_addr = (url_ent->data_multicast_ip) ? url_ent->data_multicast_ip : url_ent->child_ip;

Modified: trafficserver/traffic/branches/ssc/proxy/Socks.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/Socks.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/Socks.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/Socks.h Tue May 24 04:11:36 2011
@@ -113,35 +113,6 @@ int socks5BasicAuthHandler(int event, un
 int socks5PasswdAuthHandler(int event, unsigned char *p, void (**)(void));
 int socks5ServerAuthHandler(int event, unsigned char *p, void (**)(void));
 
-
-struct SocksAddrType
-{
-  unsigned char type;
-  union
-  {
-    //mostly it is ipv4. in other cases we will xalloc().
-    unsigned char ipv4[4];
-    unsigned char *buf;
-  } addr;
-
-  void reset()
-  {
-    if (type != SOCKS_ATYPE_IPV4 && addr.buf) {
-      xfree(addr.buf);
-    }
-    addr.buf = 0;
-    type = SOCKS_ATYPE_NONE;
-  }
-
-  SocksAddrType()
-:  type(SOCKS_ATYPE_NONE) {
-    addr.buf = 0;
-  };
-  ~SocksAddrType() {
-    reset();
-  }
-};
-
 class UnixNetVConnection;
 typedef UnixNetVConnection SocksNetVC;
 

Modified: trafficserver/traffic/branches/ssc/proxy/StufferUdpReceiver.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/StufferUdpReceiver.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/StufferUdpReceiver.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/StufferUdpReceiver.cc Tue May 24 04:11:36 2011
@@ -188,7 +188,7 @@ openTSConn()
     return -1;
   }
 
-  struct sockaddr_in saddr;
+  sockaddr_storage saddr;
   saddr.sin_family = AF_INET;
   saddr.sin_port = htons(TSPORT);
 //#define INADDR_LOOPBACK ((209<<24)|(131<<16)|(52<<8)|48)
@@ -311,12 +311,12 @@ main(int argc, char *argv[])
 
   int fd = socket(PF_INET, SOCK_DGRAM, 0);
 
-  struct sockaddr_in saddr;
+  sockaddr_storage saddr;
   saddr.sin_family = AF_INET;
   saddr.sin_port = htons(port);
   saddr.sin_addr.s_addr = INADDR_ANY;
 
-  if ((bind(fd, (struct sockaddr *) &saddr, sizeof(saddr))) < 0) {
+  if ((bind(fd, (sockaddr_storage *) &saddr, sizeof(saddr))) < 0) {
     perror("bind(udp_fd)");
     free(pkt_buf);
     return 0;

Modified: trafficserver/traffic/branches/ssc/proxy/congest/CongestionStats.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/congest/CongestionStats.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/congest/CongestionStats.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/congest/CongestionStats.h Tue May 24 04:11:36 2011
@@ -33,7 +33,7 @@
 
 // the stat variables are defined in StatSystem.h, StatSystem.cc
 void register_congest_stats();
-#include "P_RecProcess.h"
+#include <records/P_RecProcess.h>
 extern RecRawStatBlock *congest_rsb;
 
 /* Instead of enumerating the stats in DynamicStats.h, each module needs

Modified: trafficserver/traffic/branches/ssc/proxy/http/HttpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/http/HttpConfig.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/http/HttpConfig.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/http/HttpConfig.cc Tue May 24 04:11:36 2011
@@ -1135,7 +1135,7 @@ HttpConfig::startup()
 
   if (c.incoming_ip_to_bind) {
     Debug("ip_binding", "incoming_ip_to_bind: %s", c.incoming_ip_to_bind);
-    c.incoming_ip_to_bind_saddr = inet_addr(c.incoming_ip_to_bind);
+    ink_int_pton(&c.incoming_ip_to_bind_saddr, c.incoming_ip_to_bind);
   }
 
   RecGetRecordString_Xmalloc("proxy.local.outgoing_ip_to_bind", &(c.outgoing_ip_to_bind));

Modified: trafficserver/traffic/branches/ssc/proxy/http/HttpConfig.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/http/HttpConfig.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/http/HttpConfig.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/http/HttpConfig.h Tue May 24 04:11:36 2011
@@ -56,7 +56,7 @@
 #define MgmtFloat RecFloat
 
 
-#include "P_RecProcess.h"
+#include <records/P_RecProcess.h>
 
 
 /* Some defines that might be candidates for configurable settings later.
@@ -598,7 +598,7 @@ public:
   int proxy_hostname_len;
 
   char *incoming_ip_to_bind;
-  unsigned int incoming_ip_to_bind_saddr;
+  sockaddr_storage incoming_ip_to_bind_saddr;
 
   char *outgoing_ip_to_bind;
 
@@ -903,7 +903,7 @@ HttpConfigParams::HttpConfigParams()
   : proxy_hostname(0),
     proxy_hostname_len(0),
     incoming_ip_to_bind(0),
-    incoming_ip_to_bind_saddr(0),
+//    incoming_ip_to_bind_saddr(0),
     outgoing_ip_to_bind(0),
     server_max_connections(0),
     origin_min_keep_alive_connections(0),
@@ -982,7 +982,9 @@ HttpConfigParams::HttpConfigParams()
     ignore_accept_encoding_mismatch(0),
     ignore_accept_charset_mismatch(0),
     normalize_ae_gzip(1)
-{ }
+{
+  ink_inet_init(incoming_ip_to_bind_saddr);
+}
 
 inline
 HttpConfigParams::~HttpConfigParams()

Modified: trafficserver/traffic/branches/ssc/proxy/http/HttpSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/http/HttpSM.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/http/HttpSM.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/http/HttpSM.cc Tue May 24 04:11:36 2011
@@ -2224,7 +2224,7 @@ HttpSM::state_icp_lookup(int event, void
   case ICP_LOOKUP_FOUND:
     Debug("http", "ICP says ICP_LOOKUP_FOUND");
     t_state.icp_lookup_success = true;
-    t_state.icp_ip_result = *(struct sockaddr_in *) data;
+    t_state.icp_ip_result = *(sockaddr_storage *) data;
 
 /*
 *  Disable ICP loop detection since the Cidera network

Modified: trafficserver/traffic/branches/ssc/proxy/http/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/http/HttpTransact.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/http/HttpTransact.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/http/HttpTransact.cc Tue May 24 04:11:36 2011
@@ -5207,7 +5207,7 @@ HttpTransact::add_client_ip_to_outgoing_
     return;
 
   // Always prepare the IP string.
-  if (ink_inet_ntop((struct sockaddr *)&s->client_info.addr, ip_string + 1, sizeof(ip_string) - 1) != NULL) {
+  if (ink_inet_ntop((sockaddr_storage *)&s->client_info.addr, ip_string + 1, sizeof(ip_string) - 1) != NULL) {
     ip_string[0] = ' ';         // Leading space always, in case we need to concatenate this IP
     ip_string_size += strlen(ip_string);
   } else {

Modified: trafficserver/traffic/branches/ssc/proxy/http/HttpTransact.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/http/HttpTransact.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/http/HttpTransact.h (original)
+++ trafficserver/traffic/branches/ssc/proxy/http/HttpTransact.h Tue May 24 04:11:36 2011
@@ -784,7 +784,7 @@ public:
     // components is a byte, so:
     // 0x25364758 = 0x25.0x36.0x47.0x58 = 37.54.71.88 in decimal.
     unsigned int ip;
-    struct sockaddr_storage addr;
+    sockaddr_storage addr;
 
     // port to connect to, except for client
     // connection where it is port on proxy
@@ -960,7 +960,7 @@ public:
     int64_t internal_msg_buffer_index;      // out
 
     bool icp_lookup_success;    // in
-    struct sockaddr_in icp_ip_result;   // in
+    sockaddr_storage icp_ip_result;   // in
 
     int scheme;                 // out
     int next_hop_scheme;        // out

Modified: trafficserver/traffic/branches/ssc/proxy/http/test_socket_close.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/http/test_socket_close.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/http/test_socket_close.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/http/test_socket_close.cc Tue May 24 04:11:36 2011
@@ -109,7 +109,7 @@ struct Conn
   Connection_t connection_type;
   int listen_s;
   int s;
-  struct sockaddr_in addr;
+  sockaddr_storage addr;
   State state;
   //State_t            state;
   int state_delay_ms;
@@ -351,7 +351,7 @@ do_connect(Conn * from, Conn * to)
     return (from->s);
   }
   // connect
-  if (connect(from->s, (struct sockaddr *) &to->addr, sizeof(to->addr)) < 0) {
+  if (connect(from->s, (sockaddr_storage *) &to->addr, sizeof(to->addr)) < 0) {
     error = -errno;
     if (error != -EINPROGRESS) {
       ::close(from->s);
@@ -387,7 +387,7 @@ do_listen_setup(Conn * c, int port)
     return (c->listen_s);
   }
   // bind socket to port
-  if (bind(c->listen_s, (struct sockaddr *) &c->addr, sizeof(c->addr)) < 0) {
+  if (bind(c->listen_s, (sockaddr_storage *) &c->addr, sizeof(c->addr)) < 0) {
     error = -errno;
     ::close(c->listen_s);
     c->state.state = STATE_ERROR;
@@ -432,7 +432,7 @@ do_accept(Conn * c)
 
   if (select(c->listen_s + 1, &readfds, 0, 0, &timeout) > 0) {
     addrlen = sizeof(c->addr);
-    c->s = accept(c->listen_s, (struct sockaddr *) &c->addr, &addrlen);
+    c->s = accept(c->listen_s, (sockaddr_storage *) &c->addr, &addrlen);
     if (c->s < 0) {
       c->s = -errno;
       cout << "accept failed (" << c->s << ")" << endl;

Modified: trafficserver/traffic/branches/ssc/proxy/logging/LogAccessHttp.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/logging/LogAccessHttp.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/logging/LogAccessHttp.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/logging/LogAccessHttp.cc Tue May 24 04:11:36 2011
@@ -144,7 +144,7 @@ LogAccessHttp::marshal_client_host_ip(ch
   int len = INK_MIN_ALIGN;
   char buffer[INET6_ADDRSTRLEN];
 
-  str = const_cast<char*>(ink_inet_ntop(((struct sockaddr *)&(m_http_sm->t_state.client_info.addr)), buffer, sizeof(buffer)));
+  str = const_cast<char*>(ink_inet_ntop(((sockaddr_storage *)&(m_http_sm->t_state.client_info.addr)), buffer, sizeof(buffer)));
   len = LogAccess::strlen(str);
 
   if (buf) {

Modified: trafficserver/traffic/branches/ssc/proxy/logging/LogSock.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/proxy/logging/LogSock.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/proxy/logging/LogSock.cc (original)
+++ trafficserver/traffic/branches/ssc/proxy/logging/LogSock.cc Tue May 24 04:11:36 2011
@@ -94,8 +94,8 @@ LogSock::~LogSock()
 int
 LogSock::listen(int accept_port)
 {
-  struct sockaddr_in bind_addr;
-  int size = sizeof(struct sockaddr_in);
+  sockaddr_storage bind_addr;
+  int size = sizeof(sockaddr_storage);
   char this_host[MAXDNAME];
   int ret;
   SOCKET accept_sd;
@@ -197,8 +197,8 @@ int
 LogSock::accept()
 {
   int cid, connect_sd;
-  struct sockaddr_in connect_addr;
-  unsigned int size = sizeof(struct sockaddr_in);
+  sockaddr_storage connect_addr;
+  unsigned int size = sizeof(sockaddr_storage);
 
   if (!m_accept_connections || ct[0].sd < 0) {
     return LogSock::LS_ERROR_NO_CONNECTION;
@@ -247,9 +247,9 @@ int
 LogSock::connect(unsigned host_ip, int port)
 {
   int cid, connect_sd, ret;
-  struct sockaddr_in connect_addr;
+  sockaddr_storage connect_addr;
   memset(&connect_addr, 0, sizeof(connect_addr));
-  int size = sizeof(struct sockaddr_in);
+  int size = sizeof(sockaddr_storage);
 
   if (host_ip == 0 || port < 0) {
     Note("Invalid host IP or port number for connection");

Modified: trafficserver/traffic/branches/ssc/test/SDKtest/client/DoTest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/test/SDKtest/client/DoTest.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/test/SDKtest/client/DoTest.cc (original)
+++ trafficserver/traffic/branches/ssc/test/SDKtest/client/DoTest.cc Tue May 24 04:11:36 2011
@@ -148,8 +148,8 @@ DoTest::create_new_connection_and_send_r
   user_info[user].fd = fd;
   fcntl(fd, F_SETFD, O_NONBLOCK);
 
-  while ((status = connect(fd, (struct sockaddr *) user_info[user].target_addr,
-                           sizeof(struct sockaddr))) < 0 && ((errno == EINTR)));
+  while ((status = connect(fd, (sockaddr_storage *) user_info[user].target_addr,
+                           sizeof(sockaddr_storage))) < 0 && ((errno == EINTR)));
 
   gettimeofday(&current_time, NULL);
   user_info[user].connect_time = current_time;

Modified: trafficserver/traffic/branches/ssc/test/SDKtest/client/DoTest.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/test/SDKtest/client/DoTest.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/test/SDKtest/client/DoTest.h (original)
+++ trafficserver/traffic/branches/ssc/test/SDKtest/client/DoTest.h Tue May 24 04:11:36 2011
@@ -95,7 +95,7 @@ struct UserInfo
   long bytes_requested;
   StatusLineInfo status_line_info;
   char request_sent[MAX_REQUEST_SIZE];
-  struct sockaddr_in *target_addr;
+  sockaddr_storage *target_addr;
   int fd;
 
   /* for differentiate a completed/non-completed connection */
@@ -105,7 +105,7 @@ struct UserInfo
 
   /////////////////////
 #ifdef _PLUG_IN
-  struct sockaddr_in dynamic_target_addr;
+  sockaddr_storage dynamic_target_addr;
   long content_count;
   TSRequestAction action;
   TSConnectionStatus conn_status;

Modified: trafficserver/traffic/branches/ssc/test/SDKtest/client/LoadGenerator.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/test/SDKtest/client/LoadGenerator.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/test/SDKtest/client/LoadGenerator.cc (original)
+++ trafficserver/traffic/branches/ssc/test/SDKtest/client/LoadGenerator.cc Tue May 24 04:11:36 2011
@@ -46,9 +46,9 @@ LoadGenerator::initialize_stats()
 
 /* Take the hostname and port and construct a sockaddr_in* */
 int
-mksockaddr_in(const char *host, char *service, struct sockaddr_in *sin)
+mksockaddr_in(const char *host, char *service, sockaddr_storage *sin)
 {
-  memset(sin, 0, sizeof(struct sockaddr_in));
+  memset(sin, 0, sizeof(sockaddr_storage));
 
   sin->sin_family = AF_INET;
   if (isdigit(host[0]))
@@ -162,7 +162,7 @@ Only applicable for synthetic load */
 
 void
 LoadGenerator::generate_origin_server_target(char *origin_server_str,   /* Return value */
-                                             struct sockaddr_in **target        /* Return value */
+                                             sockaddr_storage **target        /* Return value */
   )
 {
   int origin_server_num = 0;
@@ -183,7 +183,7 @@ LoadGenerator::generate_origin_server_ta
 #ifdef _PLUG_IN
 /* setup a sockaddr_in for given host and port for connection */
 void
-LoadGenerator::generate_dynamic_origin_server_target(char *hostname, char *portname, struct sockaddr_in **target        /* Return value */
+LoadGenerator::generate_dynamic_origin_server_target(char *hostname, char *portname, sockaddr_storage **target        /* Return value */
   )
 {
   if (mksockaddr_in(hostname, portname, *target) < 0) {
@@ -196,7 +196,7 @@ LoadGenerator::generate_dynamic_origin_s
 /* Create synthetic request */
 void
 LoadGenerator::create_synthetic_request(char *req_string,       /* Return request */
-                                        void **req_id, long *bytes_requested_p, struct sockaddr_in **target)
+                                        void **req_id, long *bytes_requested_p, sockaddr_storage **target)
 {
   char size_str[MAX_SIZESTR_SIZE],
     serial_number_str[MAX_SERIALNUMBERSTR_SIZE],
@@ -396,7 +396,7 @@ LoadGenerator::create_request_from_logfi
 
 void
 LoadGenerator::generate_new_request(char *req_string, void **req_id,
-                                    long *bytes_requested_p, struct sockaddr_in **target)
+                                    long *bytes_requested_p, sockaddr_storage **target)
 {
 
   if (synthetic) {

Modified: trafficserver/traffic/branches/ssc/test/SDKtest/client/LoadGenerator.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/test/SDKtest/client/LoadGenerator.h?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/test/SDKtest/client/LoadGenerator.h (original)
+++ trafficserver/traffic/branches/ssc/test/SDKtest/client/LoadGenerator.h Tue May 24 04:11:36 2011
@@ -70,7 +70,7 @@ struct LoadGenerator
   char *target_host;
   char *target_port;
   char *document_base;
-  struct sockaddr_in target_addr[MAX_ORIGIN_SERVERS];
+  sockaddr_storage target_addr[MAX_ORIGIN_SERVERS];
 
   int num_sizes;                /* Number of sizes in the docsize distribution */
   long *sizes;                  /* actual sizes */
@@ -93,11 +93,11 @@ struct LoadGenerator
   /*Number of docs for each server */
   void generate_size_str(char *size_str, long *size_requested_p);
   void generate_serial_number_str(char *serial_number_str);
-  void generate_origin_server_target(char *origin_server_str, struct sockaddr_in **target);
-  void create_synthetic_request(char *req_string, void **req_id, long *size_requested_p, struct sockaddr_in **target);
+  void generate_origin_server_target(char *origin_server_str, sockaddr_storage **target);
+  void create_synthetic_request(char *req_string, void **req_id, long *size_requested_p, sockaddr_storage **target);
   void create_request_from_logfile(char *req_string, long *size_requested_p);
-  void generate_new_request(char *req_string, void **req_id, long *size_requested_p, struct sockaddr_in **target);
-  void generate_dynamic_origin_server_target(char *hostname, char *portname, struct sockaddr_in **target);
+  void generate_new_request(char *req_string, void **req_id, long *size_requested_p, sockaddr_storage **target);
+  void generate_dynamic_origin_server_target(char *hostname, char *portname, sockaddr_storage **target);
   void print_stats();
   void initialize_stats();
   void initialize_targets();
@@ -123,7 +123,7 @@ struct LoadGenerator
                 char aorigin_server_names[][MAX_HOSTNAME_SIZE],
                 char *aorigin_server_ports[MAX_HOSTNAME_SIZE],
                 char *atarget_host, char *atarget_port, char *adocument_base,
-//    struct sockaddr_in atarget_addr[],
+//    sockaddr_storage atarget_addr[],
                 int anum_sizes, /* Number of sizes in the docsize distribution */
                 long *asizes,   /* actual sizes */
                 double *acumulative_size_prob,

Modified: trafficserver/traffic/branches/ssc/test/SDKtest/client/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/test/SDKtest/client/Main.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/test/SDKtest/client/Main.cc (original)
+++ trafficserver/traffic/branches/ssc/test/SDKtest/client/Main.cc Tue May 24 04:11:36 2011
@@ -119,7 +119,7 @@ main(int argc, char *argv[])
   int req_rate = 0;
   unsigned short seed16v[3];
   struct sigaction act;
-  // struct sockaddr_in target_addr;
+  // sockaddr_storage target_addr;
   struct timeval rand_time;
   signal(SIGPIPE, SIG_IGN);
   /*

Modified: trafficserver/traffic/branches/ssc/test/SDKtest/synth_server/synth_server.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/test/SDKtest/synth_server/synth_server.c?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/test/SDKtest/synth_server/synth_server.c (original)
+++ trafficserver/traffic/branches/ssc/test/SDKtest/synth_server/synth_server.c Tue May 24 04:11:36 2011
@@ -305,14 +305,14 @@ commSetNonBlocking(int fd)
 /* Wait for an incoming connection on FD.  FD should be a socket returned
  * from comm_listen. */
 int
-comm_accept(int fd, struct sockaddr_in *peer, struct sockaddr_in *me)
+comm_accept(int fd, sockaddr_storage_in *peer, sockaddr_storage_in *me)
 {
   int sock;
-  struct sockaddr_in P;
+  sockaddr_storage_in P;
   int Slen;
 
   Slen = sizeof(P);
-  if ((sock = accept(fd, (struct sockaddr *) &P, &Slen)) < 0) {
+  if ((sock = accept(fd, (sockaddr_storage *) &P, &Slen)) < 0) {
 #ifdef DEBUG
     fprintf(stderr, "comm_accept: FD %d: accept failure\n", fd);
 #endif
@@ -358,8 +358,8 @@ commSetReuseAddr(int fd)
 void
 accept_connection()
 {
-  struct sockaddr_in peer;
-  struct sockaddr_in me;
+  sockaddr_storage_in peer;
+  sockaddr_storage_in me;
   int fd;
 
   if ((fd = comm_accept(theHttpConnection, &peer, &me)) < 0) {

Modified: trafficserver/traffic/branches/ssc/test/deft/sio_loop.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/test/deft/sio_loop.cc?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/test/deft/sio_loop.cc (original)
+++ trafficserver/traffic/branches/ssc/test/deft/sio_loop.cc Tue May 24 04:11:36 2011
@@ -66,7 +66,7 @@ SIO::open_server(unsigned short int port
     perror("socket");
     do_exit(EXIT_FAILURE);
   }
-  struct sockaddr_in name;
+  sockaddr_storage name;
 
   /* Give the socket a name. */
   name.sin_family = AF_INET;
@@ -76,7 +76,7 @@ SIO::open_server(unsigned short int port
     perror((char *) "setsockopt");
     do_exit(EXIT_FAILURE);
   }
-  if ((err = bind(sock, (struct sockaddr *) &name, sizeof(name))) < 0) {
+  if ((err = bind(sock, (sockaddr_storage *) &name, sizeof(name))) < 0) {
     if (errno == EADDRINUSE)
       return -EADDRINUSE;
     perror("bind");
@@ -84,7 +84,7 @@ SIO::open_server(unsigned short int port
   }
 
   int addrlen = sizeof(name);
-  if ((err = getsockname(sock, (struct sockaddr *) &name,
+  if ((err = getsockname(sock, (sockaddr_storage *) &name,
 #ifndef linux
                          &addrlen
 #else
@@ -123,12 +123,12 @@ SIO::open_server(unsigned short int port
 int
 SIO::accept_sock(int sock)
 {
-  struct sockaddr_in clientname;
+  sockaddr_storage clientname;
   int size = sizeof(clientname);
   int new_fd = 0;
 
   do {
-    new_fd = accept(sock, (struct sockaddr *) &clientname,
+    new_fd = accept(sock, (sockaddr_storage *) &clientname,
 #ifndef linux
                     &size
 #else
@@ -189,7 +189,7 @@ SIO::make_client(unsigned int addr, int 
   }
 
   /* Give the socket a name. */
-  struct sockaddr_in name;
+  sockaddr_storage name;
   name.sin_family = AF_INET;
   name.sin_port = htons(port);
   name.sin_addr.s_addr = addr;
@@ -198,7 +198,7 @@ SIO::make_client(unsigned int addr, int 
         ((unsigned char *) &addr)[0], ((unsigned char *) &addr)[1],
         ((unsigned char *) &addr)[2], ((unsigned char *) &addr)[3], port);
 
-  while (connect(sock, (struct sockaddr *) &name, sizeof(name)) < 0) {
+  while (connect(sock, (sockaddr_storage *) &name, sizeof(name)) < 0) {
     if (errno == EINTR)
       continue;
     if (errno == EINPROGRESS)

Modified: trafficserver/traffic/branches/ssc/tools/apichecker.pl
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/ssc/tools/apichecker.pl?rev=1126862&r1=1126861&r2=1126862&view=diff
==============================================================================
--- trafficserver/traffic/branches/ssc/tools/apichecker.pl (original)
+++ trafficserver/traffic/branches/ssc/tools/apichecker.pl Tue May 24 04:11:36 2011
@@ -28,7 +28,7 @@ require 5.006;
 #
 # Check if the line has an INK* to TS* change requirement
 #
-# tsapi const struct sockaddr_storage *INKHttpTxnClientSockAddrGet(TSHttpTxn txnp);
+# tsapi const sockaddr_storage_storage *INKHttpTxnClientSockAddrGet(TSHttpTxn txnp);
 my %INK_EXCLUDES = (
   "INKSTAT_TYPE_INT64" => 1,
   "INKSTAT_TYPE_FLOAT" => 1,



Mime
View raw message