Changeset 4e5c7ba in mainline for uspace/srv/net/nil


Ignore:
Timestamp:
2010-11-18T22:36:12Z (15 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).

Location:
uspace/srv/net/nil
Files:
5 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;
  • uspace/srv/net/nil/eth/eth.h

    rcb569e6 r4e5c7ba  
    5454typedef struct eth_device eth_device_t;
    5555
    56 /** Type definition of the Ethernet device specific data pointer.
    57  * @see eth_device
    58  */
    59 typedef eth_device_t *eth_device_ref;
    60 
    6156/** Type definition of the Ethernet protocol specific data.
    6257 * @see eth_proto
    6358 */
    6459typedef struct eth_proto eth_proto_t;
    65 
    66 /** Type definition of the Ethernet protocol specific data pointer.
    67  * @see eth_proto
    68  */
    69 typedef eth_proto_t *eth_proto_ref;
    7060
    7161/** Ethernet device map.
  • uspace/srv/net/nil/eth/eth_header.h

    rcb569e6 r4e5c7ba  
    5858typedef struct eth_header_snap eth_header_snap_t;
    5959
    60 /** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions
    61  * pointer.
    62  *
    63  * @see eth_header_snap
    64  */
    65 typedef eth_header_snap_t *eth_header_snap_ref;
    66 
    6760/** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
    6861 * @see eth_header_lsap
    6962 */
    7063typedef struct eth_header_lsap eth_header_lsap_t;
    71 
    72 /** Type definition of the Ethernet header IEEE 802.3 + 802.2 extension pointer.
    73  * @see eth_header_lsap
    74  */
    75 typedef eth_header_lsap_t *eth_header_lsap_ref;
    7664
    7765/** Type definition of the Ethernet header LSAP extension.
     
    8068typedef struct eth_ieee_lsap eth_ieee_lsap_t;
    8169
    82 /** Type definition of the Ethernet header LSAP extension pointer.
    83  * @see eth_ieee_lsap
    84  */
    85 typedef eth_ieee_lsap_t *eth_ieee_lsap_ref;
    86 
    8770/** Type definition of the Ethernet header SNAP extension.
    8871 * @see eth_snap
    8972 */
    9073typedef struct eth_snap eth_snap_t;
    91 
    92 /** Type definition of the Ethernet header SNAP extension pointer.
    93  * @see eth_snap
    94  */
    95 typedef eth_snap_t *eth_snap_ref;
    9674
    9775/** Type definition of the Ethernet header preamble.
     
    10078typedef struct eth_preamble eth_preamble_t;
    10179
    102 /** Type definition of the Ethernet header preamble pointer.
    103  * @see eth_preamble
    104  */
    105 typedef eth_preamble_t *eth_preamble_ref;
    106 
    10780/** Type definition of the Ethernet header.
    10881 * @see eth_header
    10982 */
    11083typedef struct eth_header eth_header_t;
    111 
    112 /** Type definition of the Ethernet header pointer.
    113  * @see eth_header
    114  */
    115 typedef eth_header_t *eth_header_ref;
    11684
    11785/** Ethernet header Link Service Access Point extension. */
     
    219187typedef uint32_t eth_fcs_t;
    220188
    221 /** Ethernet Frame Check Sequence pointer. */
    222 typedef eth_fcs_t *eth_fcs_ref;
    223 
    224189#endif
    225190
  • uspace/srv/net/nil/nildummy/nildummy.c

    rcb569e6 r4e5c7ba  
    153153    size_t mtu)
    154154{
    155         nildummy_device_ref device;
     155        nildummy_device_t *device;
    156156        int index;
    157157        int rc;
     
    192192       
    193193        /* Create a new device */
    194         device = (nildummy_device_ref) malloc(sizeof(nildummy_device_t));
     194        device = (nildummy_device_t *) malloc(sizeof(nildummy_device_t));
    195195        if (!device)
    196196                return ENOMEM;
     
    250250    measured_string_ref *address)
    251251{
    252         nildummy_device_ref device;
     252        nildummy_device_t *device;
    253253
    254254        if (!address)
     
    282282    size_t *prefix, size_t *content, size_t *suffix)
    283283{
    284         nildummy_device_ref device;
     284        nildummy_device_t *device;
    285285
    286286        if (!addr_len || !prefix || !content || !suffix)
     
    357357    services_t sender)
    358358{
    359         nildummy_device_ref device;
     359        nildummy_device_t *device;
    360360
    361361        fibril_rwlock_read_lock(&nildummy_globals.devices_lock);
  • uspace/srv/net/nil/nildummy/nildummy.h

    rcb569e6 r4e5c7ba  
    5454typedef struct nildummy_device nildummy_device_t;
    5555
    56 /** Type definition of the dummy nil device specific data pointer.
    57  * @see nildummy_device
    58  */
    59 typedef nildummy_device_t *nildummy_device_ref;
    60 
    6156/** Type definition of the dummy nil protocol specific data.
    6257 * @see nildummy_proto
    6358 */
    6459typedef struct nildummy_proto nildummy_proto_t;
    65 
    66 /** Type definition of the dummy nil protocol specific data pointer.
    67  * @see nildummy_proto
    68  */
    69 typedef nildummy_proto_t *nildummy_proto_ref;
    7060
    7161/** Dummy nil device map.
Note: See TracChangeset for help on using the changeset viewer.