user16684: Found this "Remote IP of TCP Socket" at: 
https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc3000/f/851/t/380635
I am trying to log the remote ip address of a client.  Using Ethernet, I have accomplished remote ip address logging.  Trying to do the same with the Adafruit CC3000 library.
Answer provided; does not respond every time with the correct "client.IP". When it is wrong; client.IP is always "client.IP: 0.0.0.0.0" which occurs more frequently than the correct "client.IP" of my computer.  Why is does this happen?  Is there a solution?   Answer is on the right track; need additional help, so client.IP is correct every time.
Edit:  File modified is Adafruit_CC3000_Server.cpp  Only change was to the clientIndex value.  Will this cause an impact on client connecting?  File is contained in "Arduino Stack Exchange.zip" linked in this post and is located in the Adafruit_CC3000 folder of the zip.  Changes are commented.
Modified files with client ip  returned.  https://drive.google.com/open?id=0Byo8QWKyqAT9TUt4d0FteENQS2s CC3000.zip  
William

user11763: This function is not built-in so you'll have to modify the library slightly. This is one way to do it, I think:

Navigate to the class Adafruit_CC3000_ClientRef in the file Adafruit_CC3000_Server.h. In the class definition, just before the private methods and attributes are defined, you will add a new public attribute as follows:
uint8_t ip_addr[4];  // assuming a typical IPv4 address

It will hold the IP address of each ClientRef instance as the connection is accepted.
Go to Adafruit_CC3000_Server::acceptNewConnections() near the end of Adafruit_CC3000_Server.cpp. A few lines will be added to get the IP address from the CC3000 and store it temporarily in the appropriate struct:
static sockaddr tSocketClientAddr;  // file scope
static socklen_t addr_len;

// Accept new connections and update the connected clients.
bool Adafruit_CC3000_Server::acceptNewConnections() {
  bool newClientCreated = false;
  // For any unconnected client, see if new connections are pending and accept
  // them as a new client.
  for (int i = 0; i < MAX_SERVER_CLIENTS; ++i) {
    if (!_clients[i].connected()) {
      // Note: Because the non-blocking option was set for the listening
      // socket this call will not block and instead return SOC_IN_PROGRESS (-2) 
      // if there are no pending client connections. Also, the address of the 
      // connected client is not needed, so those parameters are set to NULL.
      cc3k_int_poll();
      addr_len = sizeof(tSocketClientAddr);
      int soc = accept(_listenSocket, &tSocketClientAddr, &addr_len);
      if (soc > -1) {
        _clients[i] = Adafruit_CC3000_Client(soc);
        newClientCreated = true;
      }
      // else either there were no sockets to accept or an error occured.
    }
  }
  return newClientCreated;
}

You'll also edit the getClientRef() method in Adafruit_CC3000_Server.cpp:
Adafruit_CC3000_ClientRef Adafruit_CC3000_Server::getClientRef(int8_t clientIndex) {
  if (clientIndex != -1) {
    Adafruit_CC3000_ClientRef newClient =  Adafruit_CC3000_ClientRef(&_clients[clientIndex]);
    // at least 2 (family) + 2 (port) + 4 (ip_addr) bytes expected
    // also check if address is standard ipv4
    if ((addr_len >= 8) && (tSocketClientAddr.sa_family == AF_INET)){
       // copy address into array; in network byte order  
       memcpy(newClient.ip_addr, &(tSocketClientAddr.sa_data[2]), 4);
    }
    return newClient;
  }

  // Couldn't find a client ready to read, so return a client that is not 
  // connected to signal no clients are available for reading (convention
  // used by the Ethernet library).
  return Adafruit_CC3000_ClientRef(NULL);
}

Save all the files.
Now the address is stored in an array for each client and can be accessed from your sketch. For example, you can access the address in your sketch like this:
In the loop() of the the HttpServer example:
 Adafruit_CC3000_ClientRef client = httpServer.available();
 if (client) {
   Serial.println(F("Client connected."));
   for (int i = 0; i < 3; i++){
     Serial.print(client.ip_addr[i]);
     Serial.print('.');
   }
   Serial.println(client.ip_addr[3]); 
   // other code
 }


Completely untested. Good luck.

16684: <p>Found this "Remote IP of TCP Socket" at: 
<a href="https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc3000/f/851/t/380635" rel="nofollow noreferrer">https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc3000/f/851/t/380635</a></p>

<p>I am trying to log the remote ip address of a client.  Using Ethernet, I have accomplished remote ip address logging.  Trying to do the same with the Adafruit CC3000 library.</p>

<p><strong>Answer provided; does not respond every time with the correct "client.IP".</strong> When it is wrong; client.IP is always "client.IP: 0.0.0.0.0" which occurs more frequently than the correct "client.IP" of my computer.  Why is does this happen?  Is there a solution?   Answer is on the right track; need additional help, so client.IP is correct every time.</p>

<p>Edit:  File modified is Adafruit_CC3000_Server.cpp  Only change was to the clientIndex value.  Will this cause an impact on client connecting?  File is contained in "Arduino Stack Exchange.zip" linked in this post and is located in the Adafruit_CC3000 folder of the zip.  Changes are commented.</p>

<p>Modified files with client ip  returned.  <a href="https://drive.google.com/open?id=0Byo8QWKyqAT9TUt4d0FteENQS2s" rel="nofollow noreferrer">https://drive.google.com/open?id=0Byo8QWKyqAT9TUt4d0FteENQS2s</a> CC3000.zip  </p>

<p>William</p>
 11763: <p>This function is not built-in so you'll have to modify the library slightly. This is one way to do it, I think:</p>

<ul>
<li><p>Navigate to the <code>class Adafruit_CC3000_ClientRef</code> in the file <code>Adafruit_CC3000_Server.h</code>. In the class definition, just before the <code>private</code> methods and attributes are defined, you will add a new public attribute as follows:</p>

<pre><code>uint8_t ip_addr[4];  // assuming a typical IPv4 address
</code></pre>

<p>It will hold the IP address of each <code>ClientRef</code> instance as the connection is accepted.</p></li>
<li><p>Go to <code>Adafruit_CC3000_Server::acceptNewConnections()</code> near the end of <code>Adafruit_CC3000_Server.cpp</code>. A few lines will be added to get the IP address from the CC3000 and store it temporarily in the appropriate <code>struct</code>:</p>

<pre><code>static sockaddr tSocketClientAddr;  // file scope
static socklen_t addr_len;

// Accept new connections and update the connected clients.
bool Adafruit_CC3000_Server::acceptNewConnections() {
  bool newClientCreated = false;
  // For any unconnected client, see if new connections are pending and accept
  // them as a new client.
  for (int i = 0; i &lt; MAX_SERVER_CLIENTS; ++i) {
    if (!_clients[i].connected()) {
      // Note: Because the non-blocking option was set for the listening
      // socket this call will not block and instead return SOC_IN_PROGRESS (-2) 
      // if there are no pending client connections. Also, the address of the 
      // connected client is not needed, so those parameters are set to NULL.
      cc3k_int_poll();
      addr_len = sizeof(tSocketClientAddr);
      int soc = accept(_listenSocket, &amp;tSocketClientAddr, &amp;addr_len);
      if (soc &gt; -1) {
        _clients[i] = Adafruit_CC3000_Client(soc);
        newClientCreated = true;
      }
      // else either there were no sockets to accept or an error occured.
    }
  }
  return newClientCreated;
}
</code></pre></li>
<li><p>You'll also edit the <code>getClientRef()</code> method in <code>Adafruit_CC3000_Server.cpp</code>:</p>

<pre><code>Adafruit_CC3000_ClientRef Adafruit_CC3000_Server::getClientRef(int8_t clientIndex) {
  if (clientIndex != -1) {
    Adafruit_CC3000_ClientRef newClient =  Adafruit_CC3000_ClientRef(&amp;_clients[clientIndex]);
    // at least 2 (family) + 2 (port) + 4 (ip_addr) bytes expected
    // also check if address is standard ipv4
    if ((addr_len &gt;= 8) &amp;&amp; (tSocketClientAddr.sa_family == AF_INET)){
       // copy address into array; in network byte order  
       memcpy(newClient.ip_addr, &amp;(tSocketClientAddr.sa_data[2]), 4);
    }
    return newClient;
  }

  // Couldn't find a client ready to read, so return a client that is not 
  // connected to signal no clients are available for reading (convention
  // used by the Ethernet library).
  return Adafruit_CC3000_ClientRef(NULL);
}
</code></pre>

<p>Save all the files.</p></li>
<li><p>Now the address is stored in an array for each client and can be accessed from your sketch. For example, you can access the address in your sketch like this:</p>

<p>In the <code>loop()</code> of the the <code>HttpServer</code> example:</p>

<pre><code> Adafruit_CC3000_ClientRef client = httpServer.available();
 if (client) {
   Serial.println(F("Client connected."));
   for (int i = 0; i &lt; 3; i++){
     Serial.print(client.ip_addr[i]);
     Serial.print('.');
   }
   Serial.println(client.ip_addr[3]); 
   // other code
 }
</code></pre></li>
</ul>

<p>Completely untested. Good luck.</p>
