Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/eth/eth.c

    rfb04cba8 r4eca056  
    156156typedef enum eth_addr_type eth_addr_type_t;
    157157
    158 /** Type definition of the ethernet address type pointer.
    159  * @see eth_addr_type
    160  */
    161 typedef eth_addr_type_t *eth_addr_type_ref;
    162 
    163158/** Ethernet address type. */
    164159enum eth_addr_type {
     
    178173{
    179174        int index;
    180         eth_proto_ref proto;
     175        eth_proto_t *proto;
    181176
    182177        fibril_rwlock_read_lock(&eth_globals.protos_lock);
     
    286281    size_t mtu)
    287282{
    288         eth_device_ref device;
     283        eth_device_t *device;
    289284        int index;
    290285        measured_string_t names[2] = {
     
    298293                }
    299294        };
    300         measured_string_ref configuration;
     295        measured_string_t *configuration;
    301296        size_t count = sizeof(names) / sizeof(measured_string_t);
    302297        char *data;
    303         eth_proto_ref proto;
     298        eth_proto_t *proto;
    304299        int rc;
    305300
     
    342337       
    343338        /* Create a new device */
    344         device = (eth_device_ref) malloc(sizeof(eth_device_t));
     339        device = (eth_device_t *) malloc(sizeof(eth_device_t));
    345340        if (!device)
    346341                return ENOMEM;
     
    434429 * @returns             NULL if the packet address length is not big enough.
    435430 */
    436 static eth_proto_ref eth_process_packet(int flags, packet_t packet)
    437 {
    438         eth_header_snap_ref header;
     431static eth_proto_t *eth_process_packet(int flags, packet_t packet)
     432{
     433        eth_header_snap_t *header;
    439434        size_t length;
    440435        eth_type_t type;
    441436        size_t prefix;
    442437        size_t suffix;
    443         eth_fcs_ref fcs;
     438        eth_fcs_t *fcs;
    444439        uint8_t *data;
    445440        int rc;
     
    454449       
    455450        data = packet_get_data(packet);
    456         header = (eth_header_snap_ref) data;
     451        header = (eth_header_snap_t *) data;
    457452        type = ntohs(header->header.ethertype);
    458453       
     
    461456                prefix = sizeof(eth_header_t);
    462457                suffix = 0;
    463                 fcs = (eth_fcs_ref) data + length - sizeof(eth_fcs_t);
     458                fcs = (eth_fcs_t *) data + length - sizeof(eth_fcs_t);
    464459                length -= sizeof(eth_fcs_t);
    465460        } else if(type <= ETH_MAX_CONTENT) {
     
    487482
    488483                suffix = (type < ETH_MIN_CONTENT) ? ETH_MIN_CONTENT - type : 0U;
    489                 fcs = (eth_fcs_ref) data + prefix + type + suffix;
     484                fcs = (eth_fcs_t *) data + prefix + type + suffix;
    490485                suffix += length - prefix - type;
    491486                length = prefix + type + suffix;
     
    516511    packet_t packet, services_t target)
    517512{
    518         eth_proto_ref proto;
     513        eth_proto_t *proto;
    519514        packet_t next;
    520         eth_device_ref device;
     515        eth_device_t *device;
    521516        int flags;
    522517
     
    564559    size_t *prefix, size_t *content, size_t *suffix)
    565560{
    566         eth_device_ref device;
     561        eth_device_t *device;
    567562
    568563        if (!addr_len || !prefix || !content || !suffix)
     
    596591 */
    597592static int eth_addr_message(device_id_t device_id, eth_addr_type_t type,
    598     measured_string_ref *address)
    599 {
    600         eth_device_ref device;
     593    measured_string_t **address)
     594{
     595        eth_device_t *device;
    601596
    602597        if (!address)
     
    631626static int eth_register_message(services_t service, int phone)
    632627{
    633         eth_proto_ref proto;
     628        eth_proto_t *proto;
    634629        int protocol;
    635630        int index;
     
    646641                return EOK;
    647642        } else {
    648                 proto = (eth_proto_ref) malloc(sizeof(eth_proto_t));
     643                proto = (eth_proto_t *) malloc(sizeof(eth_proto_t));
    649644                if (!proto) {
    650645                        fibril_rwlock_write_unlock(&eth_globals.protos_lock);
     
    688683    size_t mtu)
    689684{
    690         eth_header_snap_ref header;
    691         eth_header_lsap_ref header_lsap;
    692         eth_header_ref header_dix;
    693         eth_fcs_ref fcs;
     685        eth_header_snap_t *header;
     686        eth_header_lsap_t *header_lsap;
     687        eth_header_t *header_dix;
     688        eth_fcs_t *fcs;
    694689        uint8_t *src;
    695690        uint8_t *dest;
     
    697692        int i;
    698693        void *padding;
    699         eth_preamble_ref preamble;
     694        eth_preamble_t *preamble;
    700695
    701696        i = packet_get_addr(packet, &src, &dest);
     
    795790    services_t sender)
    796791{
    797         eth_device_ref device;
     792        eth_device_t *device;
    798793        packet_t next;
    799794        packet_t tmp;
     
    845840    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
    846841{
    847         measured_string_ref address;
     842        measured_string_t *address;
    848843        packet_t packet;
    849844        size_t addrlen;
Note: See TracChangeset for help on using the changeset viewer.