Ignore:
Timestamp:
2011-01-09T23:24:53Z (13 years ago)
Author:
martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4b86dac
Parents:
3c106e88
Message:

partial networking stack overhaul

  • a lot of coding style changes (comments, indentation, etc.)
  • convert several ints to unsigned ints or size_t values
  • streamline many of the IPC-related macros (they no longer dereference the call structure by themselves)
  • get rid of netif_interface.h (containing only aliases for remote functions and not serving any purpose)
  • rename netif_local.{c|h} to netif_skel.{c|h} (it is really just a skeleton)
  • drop the "_remote" and "_standalone" suffixes from most of the netif_ functions (they do not serve any purpose anymore)
  • implement netif_client_connection() as a common framework function for all netif modules
    • update the lo module accordingly
  • ip module now reports the default gateway to the user whenever it is being set
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/packet/generic/packet_server.c

    r3c106e88 r774e6d1a  
    322322int
    323323packet_server_message(ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer,
    324     int *answer_count)
     324    size_t *answer_count)
    325325{
    326326        packet_t *packet;
     
    333333        case NET_PACKET_CREATE_1:
    334334                packet = packet_get_local(DEFAULT_ADDR_LEN, DEFAULT_PREFIX,
    335                     IPC_GET_CONTENT(call), DEFAULT_SUFFIX);
     335                    IPC_GET_CONTENT(*call), DEFAULT_SUFFIX);
    336336                if (!packet)
    337337                        return ENOMEM;
     
    343343        case NET_PACKET_CREATE_4:
    344344                packet = packet_get_local(
    345                     ((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN(call)) ?
    346                     IPC_GET_ADDR_LEN(call) : DEFAULT_ADDR_LEN),
    347                     DEFAULT_PREFIX + IPC_GET_PREFIX(call),
    348                     IPC_GET_CONTENT(call),
    349                     DEFAULT_SUFFIX + IPC_GET_SUFFIX(call));
     345                    ((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN(*call)) ?
     346                    IPC_GET_ADDR_LEN(*call) : DEFAULT_ADDR_LEN),
     347                    DEFAULT_PREFIX + IPC_GET_PREFIX(*call),
     348                    IPC_GET_CONTENT(*call),
     349                    DEFAULT_SUFFIX + IPC_GET_SUFFIX(*call));
    350350                if (!packet)
    351351                        return ENOMEM;
     
    356356       
    357357        case NET_PACKET_GET:
    358                 packet = pm_find(IPC_GET_ID(call));
     358                packet = pm_find(IPC_GET_ID(*call));
    359359                if (!packet_is_valid(packet))
    360360                        return ENOENT;
     
    362362       
    363363        case NET_PACKET_GET_SIZE:
    364                 packet = pm_find(IPC_GET_ID(call));
     364                packet = pm_find(IPC_GET_ID(*call));
    365365                if (!packet_is_valid(packet))
    366366                        return ENOENT;
     
    370370       
    371371        case NET_PACKET_RELEASE:
    372                 return packet_release_wrapper(IPC_GET_ID(call));
     372                return packet_release_wrapper(IPC_GET_ID(*call));
    373373        }
    374374       
Note: See TracChangeset for help on using the changeset viewer.