Changeset 257feec in mainline for uspace/srv/net/inetsrv


Ignore:
Timestamp:
2013-06-27T12:48:32Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9f391e9
Parents:
679ee84
Message:

cstyle (no change in functionality)

Location:
uspace/srv/net/inetsrv
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/addrobj.c

    r679ee84 r257feec  
    137137                }
    138138        }
    139 
     139       
    140140        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find: Not found");
    141141        fibril_mutex_unlock(&addr_list_lock);
    142 
     142       
    143143        return NULL;
    144144}
  • uspace/srv/net/inetsrv/addrobj.h

    r679ee84 r257feec  
    5959extern int inet_addrobj_get_id_list(sysarg_t **, size_t *);
    6060
    61 
    6261#endif
    6362
  • uspace/srv/net/inetsrv/icmp_std.h

    r679ee84 r257feec  
    4343
    4444/** Type of service used for ICMP */
    45 #define ICMP_TOS        0
     45#define ICMP_TOS  0
    4646
    4747/** ICMP message type */
  • uspace/srv/net/inetsrv/inet_link.c

    r679ee84 r257feec  
    7070                return rc;
    7171        }
    72 
     72       
    7373        log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet()");
    7474        rc = inet_recv_packet(&packet);
    7575        log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet -> %d", rc);
    7676        free(packet.data);
    77 
     77       
    7878        return rc;
    7979}
     
    232232        if (ilink->iplink != NULL)
    233233                iplink_close(ilink->iplink);
     234       
    234235        inet_link_delete(ilink);
    235236        return rc;
     
    263264         * inet_pdu_encode().
    264265         */
     266       
    265267        inet_packet_t packet;
    266268       
  • uspace/srv/net/inetsrv/inetcfg.c

    r679ee84 r257feec  
    377377}
    378378
    379 
    380379static void inetcfg_get_link_list_srv(ipc_callid_t callid, ipc_call_t *call)
    381380{
  • uspace/srv/net/inetsrv/inetping.c

    r679ee84 r257feec  
    9494        int rc = async_data_write_start(exch, sdu->data, sdu->size);
    9595        async_exchange_end(exch);
    96 
     96       
    9797        if (rc != EOK) {
    9898                async_forget(req);
    9999                return rc;
    100100        }
    101 
     101       
    102102        sysarg_t retval;
    103103        async_wait_for(req, &retval);
    104         if (retval != EOK) {
    105                 return retval;
    106         }
    107 
    108         return EOK;
     104       
     105        return (int) retval;
    109106}
    110107
     
    151148        if (sess == NULL)
    152149                return ENOMEM;
    153 
     150       
    154151        client->sess = sess;
    155152        link_initialize(&client->client_list);
    156 
     153       
    157154        fibril_mutex_lock(&client_list_lock);
    158155        client->ident = ++inetping_ident;
    159156        list_append(&client->client_list, &client_list);
    160157        fibril_mutex_unlock(&client_list_lock);
    161 
     158       
    162159        return EOK;
    163160}
     
    167164        async_hangup(client->sess);
    168165        client->sess = NULL;
    169 
     166       
    170167        fibril_mutex_lock(&client_list_lock);
    171168        list_remove(&client->client_list);
     
    204201        if (rc != EOK)
    205202                return;
    206 
     203       
    207204        while (true) {
    208205                ipc_call_t call;
    209206                ipc_callid_t callid = async_get_call(&call);
    210207                sysarg_t method = IPC_GET_IMETHOD(call);
    211 
     208               
    212209                if (!method) {
    213210                        /* The other side has hung up */
     
    215212                        break;
    216213                }
    217 
     214               
    218215                switch (method) {
    219216                case INETPING_SEND:
     
    227224                }
    228225        }
    229 
     226       
    230227        inetping_client_fini(&client);
    231228}
  • uspace/srv/net/inetsrv/pdu.c

    r679ee84 r257feec  
    203203
    204204        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_pdu_decode()");
    205 
     205       
    206206        if (size < sizeof(ip_header_t)) {
    207207                log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size);
     
    223223                return EINVAL;
    224224        }
    225 
     225       
    226226        if (tot_len > size) {
    227227                log_msg(LOG_DEFAULT, LVL_DEBUG, "Total Length = %zu > PDU size = %zu",
     
    242242        packet->ttl = hdr->ttl;
    243243        packet->ident = ident;
    244 
     244       
    245245        packet->df = (flags_foff & BIT_V(uint16_t, FF_FLAG_DF)) != 0;
    246246        packet->mf = (flags_foff & BIT_V(uint16_t, FF_FLAG_MF)) != 0;
    247247        packet->offs = foff * FRAG_OFFS_UNIT;
    248 
     248       
    249249        /* XXX IP options */
    250250        data_offs = sizeof(uint32_t) * BIT_RANGE_EXTRACT(uint8_t, VI_IHL_h,
     
    257257                return ENOMEM;
    258258        }
    259 
    260         memcpy(packet->data, (uint8_t *)data + data_offs, packet->size);
    261 
     259       
     260        memcpy(packet->data, (uint8_t *) data + data_offs, packet->size);
     261       
    262262        return EOK;
    263263}
Note: See TracChangeset for help on using the changeset viewer.