Changeset 61bfc370 in mainline for uspace/srv/net/nil/eth/eth.c


Ignore:
Timestamp:
2011-01-07T18:57:55Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e08a733
Parents:
7c34b28f
Message:
  • make measured_string and other network-related data types binary-safe
  • fix several network-related routines binary-safe (replace clearly suspicious use of str_lcmp() with bcmp())
  • rename spawn() to net_spawn()
File:
1 edited

Legend:

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

    r7c34b28f r61bfc370  
    201201
    202202        eth_globals.broadcast_addr =
    203             measured_string_create_bulk("\xFF\xFF\xFF\xFF\xFF\xFF", ETH_ADDR);
     203            measured_string_create_bulk((uint8_t *) "\xFF\xFF\xFF\xFF\xFF\xFF", ETH_ADDR);
    204204        if (!eth_globals.broadcast_addr) {
    205205                rc = ENOMEM;
     
    284284        measured_string_t names[2] = {
    285285                {
    286                         (char *) "ETH_MODE",
     286                        (uint8_t *) "ETH_MODE",
    287287                        8
    288288                },
    289289                {
    290                         (char *) "ETH_DUMMY",
     290                        (uint8_t *) "ETH_DUMMY",
    291291                        9
    292292                }
     
    294294        measured_string_t *configuration;
    295295        size_t count = sizeof(names) / sizeof(measured_string_t);
    296         char *data;
     296        uint8_t *data;
    297297        eth_proto_t *proto;
    298298        int rc;
     
    358358
    359359        if (configuration) {
    360                 if (!str_lcmp(configuration[0].value, "DIX",
     360                if (!str_lcmp((char *) configuration[0].value, "DIX",
    361361                    configuration[0].length)) {
    362362                        device->flags |= ETH_DIX;
    363                 } else if(!str_lcmp(configuration[0].value, "8023_2_LSAP",
     363                } else if(!str_lcmp((char *) configuration[0].value, "8023_2_LSAP",
    364364                    configuration[0].length)) {
    365365                        device->flags |= ETH_8023_2_LSAP;
Note: See TracChangeset for help on using the changeset viewer.