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

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/nil/nildummy/nildummy.c

    rc9ebbe71 rfb04cba8  
    150150 *                      netif_get_addr_req() function.
    151151 */
    152 static int
    153 nildummy_device_message(device_id_t device_id, services_t service, size_t mtu)
     152static int nildummy_device_message(device_id_t device_id, services_t service,
     153    size_t mtu)
    154154{
    155155        nildummy_device_ref device;
     
    159159        fibril_rwlock_write_lock(&nildummy_globals.devices_lock);
    160160
    161         // an existing device?
     161        /* An existing device? */
    162162        device = nildummy_devices_find(&nildummy_globals.devices, device_id);
    163163        if (device) {
     
    169169                }
    170170               
    171                 // update mtu
     171                /* Update MTU */
    172172                if (mtu > 0)
    173173                        device->mtu = mtu;
     
    179179                fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
    180180               
    181                 // notify the upper layer module
     181                /* Notify the upper layer module */
    182182                fibril_rwlock_read_lock(&nildummy_globals.protos_lock);
    183183                if (nildummy_globals.proto.phone) {
     
    191191        }
    192192       
    193         // create a new device
     193        /* Create a new device */
    194194        device = (nildummy_device_ref) malloc(sizeof(nildummy_device_t));
    195195        if (!device)
     
    203203                device->mtu = NET_DEFAULT_MTU;
    204204
    205         // bind the device driver
     205        /* Bind the device driver */
    206206        device->phone = netif_bind_service(device->service, device->device_id,
    207207            SERVICE_ETHERNET, nildummy_receiver);
     
    212212        }
    213213       
    214         // get hardware address
     214        /* Get hardware address */
    215215        rc = netif_get_addr_req(device->phone, device->device_id, &device->addr,
    216216            &device->addr_data);
     
    221221        }
    222222       
    223         // add to the cache
     223        /* Add to the cache */
    224224        index = nildummy_devices_add(&nildummy_globals.devices,
    225225            device->device_id, device);
     
    247247 *
    248248 */
    249 static int
    250 nildummy_addr_message(device_id_t device_id, measured_string_ref *address)
     249static int nildummy_addr_message(device_id_t device_id,
     250    measured_string_ref *address)
    251251{
    252252        nildummy_device_ref device;
     
    279279 *
    280280 */
    281 static int
    282 nildummy_packet_space_message(device_id_t device_id, size_t *addr_len,
     281static int nildummy_packet_space_message(device_id_t device_id, size_t *addr_len,
    283282    size_t *prefix, size_t *content, size_t *suffix)
    284283{
     
    294293                return ENOENT;
    295294        }
     295
    296296        *content = device->mtu;
    297297        fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
     
    303303}
    304304
    305 int
    306 nil_received_msg_local(int nil_phone, device_id_t device_id, packet_t packet,
    307     services_t target)
     305int nil_received_msg_local(int nil_phone, device_id_t device_id,
     306    packet_t packet, services_t target)
    308307{
    309308        packet_t next;
     
    355354 * @return              EINVAL if the service parameter is not known.
    356355 */
    357 static int
    358 nildummy_send_message(device_id_t device_id, packet_t packet, services_t sender)
     356static int nildummy_send_message(device_id_t device_id, packet_t packet,
     357    services_t sender)
    359358{
    360359        nildummy_device_ref device;
     
    366365                return ENOENT;
    367366        }
    368         // send packet queue
     367
     368        /* Send packet queue */
    369369        if (packet)
    370370                netif_send_msg(device->phone, device_id, packet,
     
    374374}
    375375
    376 int
    377 nil_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
    378     ipc_call_t *answer, int *answer_count)
     376int nil_message_standalone(const char *name, ipc_callid_t callid,
     377    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
    379378{
    380379        measured_string_ref address;
Note: See TracChangeset for help on using the changeset viewer.