VirtualBox

Ignore:
Timestamp:
Feb 14, 2010 7:59:48 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57665
Message:

Devices: whitespace cleanup

Location:
trunk/src/VBox/Devices/Network/slirp/dnsproxy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c

    r26404 r26495  
    102102#else /* VBOX */
    103103static void
    104 timeout(PNATState pData, struct socket *so, void *arg) 
     104timeout(PNATState pData, struct socket *so, void *arg)
    105105{
    106106    struct request *req = (struct request *)arg;
     
    119119        struct udphdr *udp;
    120120        int iphlen;
    121         struct socket *so1 = socreate(); 
     121        struct socket *so1 = socreate();
    122122        struct mbuf *m = NULL;
    123123        char *data;
     
    146146        /* mbuf initialization */
    147147        m->m_data += if_maxlinkhdr;
    148         ip = mtod(m, struct ip *); 
     148        ip = mtod(m, struct ip *);
    149149        udp = (struct udphdr *)&ip[1]; /* ip attributes */
    150150        data = (char *)&udp[1];
     
    175175 * queue and send it to the correct server.
    176176 *
    177  * Slirp: this routine should be called from udp_input 
     177 * Slirp: this routine should be called from udp_input
    178178 * socket is Slirp's construction (here we should set expiration time for socket)
    179179 * mbuf points on ip header to easy fetch information about source and destination.
     
    268268
    269269    /* fill the request structure */
    270     if (so->so_timeout_arg == NULL) 
     270    if (so->so_timeout_arg == NULL)
    271271    {
    272272        req->id = QUERYID;
     
    280280            if (fail_counter == 0)
    281281                LogRel(("NAT/dnsproxy: Empty DNS entry (suppressed 100 times)\n"));
    282             else 
     282            else
    283283                fail_counter = (fail_counter == 100 ? 0 : fail_counter + 1);
    284284            return;
    285            
     285
    286286        }
    287287        retransmit = 0;
     
    290290        req->nbyte = byte;
    291291        memcpy(req->byte, buf, byte); /* copying original request */
    292     } 
    293     else 
     292    }
     293    else
    294294    {
    295295        retransmit = 1;
     
    383383 * server. Find the corresponding query and send answer back to querying
    384384 * host.
    385  * 
     385 *
    386386 * Slirp: we call this from the routine from socrecvfrom routine handling UDP responses.
    387387 * So at the moment of call response already has been readed and packed into the mbuf
     
    430430    if ((query = hash_find_request(pData, *((unsigned short *)buf))) == NULL) {
    431431        ++late_answers;
    432         /* Probably, this request wasn't serviced by 
     432        /* Probably, this request wasn't serviced by
    433433         * dnsproxy so we won't care about it here*/
    434434        so->so_expire = curtime + SO_EXPIREFAST;
     
    632632}
    633633#else
    634 int 
     634int
    635635dnsproxy_init(PNATState pData)
    636636{
  • trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.h

    r18815 r26495  
    7878    struct request      *next;
    7979#ifdef VBOX
    80     /* this field used for saving last attempt 
    81      * to connect server, timeout function should change 
     80    /* this field used for saving last attempt
     81     * to connect server, timeout function should change
    8282     * it's value on next server. And dnsproxy_query should
    8383     * initializate with first server in the list
    8484     */
    85     struct dns_entry    *dns_server;   
     85    struct dns_entry    *dns_server;
    8686    int nbyte; /* length of dns request */
    8787    char byte[1]; /* copy of original request */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette