- connection_t *c;
- avl_node_t *node;
- int result, i;
- int len = sizeof(result);
- vpn_packet_t packet;
-
- cp();
-
- if(FD_ISSET(device_fd, f)) {
- if(read_packet(&packet))
- route(myself, &packet);
- }
-
- for(node = connection_tree->head; node; node = node->next) {
- c = node->data;
-
- if(c->status.remove)
- continue;
-
- if(FD_ISSET(c->socket, f)) {
- if(c->status.connecting) {
- c->status.connecting = false;
- getsockopt(c->socket, SOL_SOCKET, SO_ERROR, &result, &len);