Changeset 4e5c7ba in mainline for uspace/srv/net/nil/eth/eth.c


Ignore:
Timestamp:
2010-11-18T22:36:12Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f772bc55
Parents:
cb569e6
Message:

Remove xxx_ref typedefs (part 1).

File:
1 edited

Legend:

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

    rcb569e6 r4e5c7ba  
    178178{
    179179        int index;
    180         eth_proto_ref proto;
     180        eth_proto_t *proto;
    181181
    182182        fibril_rwlock_read_lock(&eth_globals.protos_lock);
     
    286286    size_t mtu)
    287287{
    288         eth_device_ref device;
     288        eth_device_t *device;
    289289        int index;
    290290        measured_string_t names[2] = {
     
    301301        size_t count = sizeof(names) / sizeof(measured_string_t);
    302302        char *data;
    303         eth_proto_ref proto;
     303        eth_proto_t *proto;
    304304        int rc;
    305305
     
    342342       
    343343        /* Create a new device */
    344         device = (eth_device_ref) malloc(sizeof(eth_device_t));
     344        device = (eth_device_t *) malloc(sizeof(eth_device_t));
    345345        if (!device)
    346346                return ENOMEM;
     
    434434 * @returns             NULL if the packet address length is not big enough.
    435435 */
    436 static eth_proto_ref eth_process_packet(int flags, packet_t packet)
    437 {
    438         eth_header_snap_ref header;
     436static eth_proto_t *eth_process_packet(int flags, packet_t packet)
     437{
     438        eth_header_snap_t *header;
    439439        size_t length;
    440440        eth_type_t type;
    441441        size_t prefix;
    442442        size_t suffix;
    443         eth_fcs_ref fcs;
     443        eth_fcs_t *fcs;
    444444        uint8_t *data;
    445445        int rc;
     
    454454       
    455455        data = packet_get_data(packet);
    456         header = (eth_header_snap_ref) data;
     456        header = (eth_header_snap_t *) data;
    457457        type = ntohs(header->header.ethertype);
    458458       
     
    461461                prefix = sizeof(eth_header_t);
    462462                suffix = 0;
    463                 fcs = (eth_fcs_ref) data + length - sizeof(eth_fcs_t);
     463                fcs = (eth_fcs_t *) data + length - sizeof(eth_fcs_t);
    464464                length -= sizeof(eth_fcs_t);
    465465        } else if(type <= ETH_MAX_CONTENT) {
     
    487487
    488488                suffix = (type < ETH_MIN_CONTENT) ? ETH_MIN_CONTENT - type : 0U;
    489                 fcs = (eth_fcs_ref) data + prefix + type + suffix;
     489                fcs = (eth_fcs_t *) data + prefix + type + suffix;
    490490                suffix += length - prefix - type;
    491491                length = prefix + type + suffix;
     
    516516    packet_t packet, services_t target)
    517517{
    518         eth_proto_ref proto;
     518        eth_proto_t *proto;
    519519        packet_t next;
    520         eth_device_ref device;
     520        eth_device_t *device;
    521521        int flags;
    522522
     
    564564    size_t *prefix, size_t *content, size_t *suffix)
    565565{
    566         eth_device_ref device;
     566        eth_device_t *device;
    567567
    568568        if (!addr_len || !prefix || !content || !suffix)
     
    598598    measured_string_ref *address)
    599599{
    600         eth_device_ref device;
     600        eth_device_t *device;
    601601
    602602        if (!address)
     
    631631static int eth_register_message(services_t service, int phone)
    632632{
    633         eth_proto_ref proto;
     633        eth_proto_t *proto;
    634634        int protocol;
    635635        int index;
     
    646646                return EOK;
    647647        } else {
    648                 proto = (eth_proto_ref) malloc(sizeof(eth_proto_t));
     648                proto = (eth_proto_t *) malloc(sizeof(eth_proto_t));
    649649                if (!proto) {
    650650                        fibril_rwlock_write_unlock(&eth_globals.protos_lock);
     
    688688    size_t mtu)
    689689{
    690         eth_header_snap_ref header;
    691         eth_header_lsap_ref header_lsap;
    692         eth_header_ref header_dix;
    693         eth_fcs_ref fcs;
     690        eth_header_snap_t *header;
     691        eth_header_lsap_t *header_lsap;
     692        eth_header_t *header_dix;
     693        eth_fcs_t *fcs;
    694694        uint8_t *src;
    695695        uint8_t *dest;
     
    697697        int i;
    698698        void *padding;
    699         eth_preamble_ref preamble;
     699        eth_preamble_t *preamble;
    700700
    701701        i = packet_get_addr(packet, &src, &dest);
     
    795795    services_t sender)
    796796{
    797         eth_device_ref device;
     797        eth_device_t *device;
    798798        packet_t next;
    799799        packet_t tmp;
Note: See TracChangeset for help on using the changeset viewer.