Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset fb04cba8 in mainline for uspace/srv/net/il/arp/arp.c


Ignore:
Timestamp:
2010-11-14T14:07:05Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
9e2e715
Parents:
c9ebbe71
Message:

Fix style of function headers and comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/il/arp/arp.c

    rc9ebbe71 rfb04cba8  
    125125}
    126126
    127 static int
    128 arp_clear_address_req(int arp_phone, device_id_t device_id, services_t protocol,
    129     measured_string_ref address)
     127static int arp_clear_address_req(int arp_phone, device_id_t device_id,
     128    services_t protocol, measured_string_ref address)
    130129{
    131130        arp_device_ref device;
     
    175174 * @returns             ENOMEM if there is not enough memory left.
    176175 */
    177 static int
    178 arp_proto_create(arp_proto_ref *proto, services_t service,
     176static int arp_proto_create(arp_proto_ref *proto, services_t service,
    179177    measured_string_ref address)
    180178{
     
    214212 *                      measured_strings_return() function.
    215213 */
    216 static int
    217 arp_device_message(device_id_t device_id, services_t service,
     214static int arp_device_message(device_id_t device_id, services_t service,
    218215    services_t protocol, measured_string_ref address)
    219216{
     
    225222
    226223        fibril_rwlock_write_lock(&arp_globals.lock);
    227         // an existing device?
     224
     225        /* An existing device? */
    228226        device = arp_cache_find(&arp_globals.cache, device_id);
     227
    229228        if (device) {
    230229                if (device->service != service) {
     
    260259                        return ENOENT;
    261260               
    262                 // create a new device
     261                /* Create a new device */
    263262                device = (arp_device_ref) malloc(sizeof(arp_device_t));
    264263                if (!device) {
     
    289288                device->service = service;
    290289               
    291                 // bind the new one
     290                /* Bind the new one */
    292291                device->phone = nil_bind_service(device->service,
    293292                    (ipcarg_t) device->device_id, SERVICE_ARP,
     
    300299                }
    301300               
    302                 // get packet dimensions
     301                /* Get packet dimensions */
    303302                rc = nil_packet_size_req(device->phone, device_id,
    304303                    &device->packet_dimension);
     
    310309                }
    311310               
    312                 // get hardware address
     311                /* Get hardware address */
    313312                rc = nil_get_addr_req(device->phone, device_id, &device->addr,
    314313                    &device->addr_data);
     
    320319                }
    321320               
    322                 // get broadcast address
     321                /* Get broadcast address */
    323322                rc = nil_get_broadcast_addr_req(device->phone, device_id,
    324323                    &device->broadcast_addr, &device->broadcast_data);
     
    455454        hw_source = arp_addr_find(&proto->addresses, (char *) src_proto,
    456455            CONVERT_SIZE(uint8_t, char, header->protocol_length));
    457         // exists?
     456        /* Exists? */
    458457        if (hw_source) {
    459458                if (hw_source->length != CONVERT_SIZE(uint8_t, char,
     
    463462                memcpy(hw_source->value, src_hw, hw_source->length);
    464463        }
    465         // is my protocol address?
     464        /* Is my protocol address? */
    466465        if (proto->addr->length != CONVERT_SIZE(uint8_t, char,
    467466            header->protocol_length)) {
     
    470469        if (!str_lcmp(proto->addr->value, (char *) des_proto,
    471470            proto->addr->length)) {
    472                 // not already upadted?
     471                /* Not already updated? */
    473472                if (!hw_source) {
    474473                        hw_source = measured_string_create_bulk((char *) src_hw,
     
    550549                return addr;
    551550
    552         // ARP packet content size = header + (address + translation) * 2
     551        /* ARP packet content size = header + (address + translation) * 2 */
    553552        length = 8 + 2 * (CONVERT_SIZE(char, uint8_t, proto->addr->length) +
    554553            CONVERT_SIZE(char, uint8_t, device->addr->length));
     
    674673       
    675674        case NET_IL_DEVICE_STATE:
    676                 // do nothing - keep the cache
     675                /* Do nothing - keep the cache */
    677676                return EOK;
    678677       
Note: See TracChangeset for help on using the changeset viewer.