Changeset 973ef9fc in mainline for uspace/srv/net/nil/eth/eth.c


Ignore:
Timestamp:
2010-12-25T21:20:28Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
631ee0c
Parents:
1bfd3d3 (diff), 09178b7f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r1bfd3d3 r973ef9fc  
    201201
    202202        eth_globals.broadcast_addr =
    203             measured_string_create_bulk("\xFF\xFF\xFF\xFF\xFF\xFF",
    204             CONVERT_SIZE(uint8_t, char, ETH_ADDR));
     203            measured_string_create_bulk("\xFF\xFF\xFF\xFF\xFF\xFF", ETH_ADDR);
    205204        if (!eth_globals.broadcast_addr) {
    206205                rc = ENOMEM;
     
    234233static void eth_receiver(ipc_callid_t iid, ipc_call_t *icall)
    235234{
    236         packet_t packet;
     235        packet_t *packet;
    237236        int rc;
    238237
    239238        while (true) {
    240                 switch (IPC_GET_METHOD(*icall)) {
     239                switch (IPC_GET_IMETHOD(*icall)) {
    241240                case NET_NIL_DEVICE_STATE:
    242241                        nil_device_state_msg_local(0, IPC_GET_DEVICE(icall),
     
    251250                                    IPC_GET_DEVICE(icall), packet, 0);
    252251                        }
    253                         ipc_answer_0(iid, (ipcarg_t) rc);
     252                        ipc_answer_0(iid, (sysarg_t) rc);
    254253                        break;
    255254                default:
    256                         ipc_answer_0(iid, (ipcarg_t) ENOTSUP);
     255                        ipc_answer_0(iid, (sysarg_t) ENOTSUP);
    257256                }
    258257               
     
    315314                        device->mtu = ETH_MAX_TAGGED_CONTENT(device->flags);
    316315               
    317                 printf("Device %d already exists:\tMTU\t= %d\n",
     316                printf("Device %d already exists:\tMTU\t= %zu\n",
    318317                    device->device_id, device->mtu);
    319318                fibril_rwlock_write_unlock(&eth_globals.devices_lock);
     
    407406        }
    408407       
    409         printf("%s: Device registered (id: %d, service: %d: mtu: %d, "
     408        printf("%s: Device registered (id: %d, service: %d: mtu: %zu, "
    410409            "mac: %x:%x:%x:%x:%x:%x, flags: 0x%x)\n",
    411410            NAME, device->device_id, device->service, device->mtu,
     
    429428 * @return              NULL if the packet address length is not big enough.
    430429 */
    431 static eth_proto_t *eth_process_packet(int flags, packet_t packet)
     430static eth_proto_t *eth_process_packet(int flags, packet_t *packet)
    432431{
    433432        eth_header_snap_t *header;
     
    509508
    510509int nil_received_msg_local(int nil_phone, device_id_t device_id,
    511     packet_t packet, services_t target)
     510    packet_t *packet, services_t target)
    512511{
    513512        eth_proto_t *proto;
    514         packet_t next;
     513        packet_t *next;
    515514        eth_device_t *device;
    516515        int flags;
     
    680679 */
    681680static int
    682 eth_prepare_packet(int flags, packet_t packet, uint8_t *src_addr, int ethertype,
     681eth_prepare_packet(int flags, packet_t *packet, uint8_t *src_addr, int ethertype,
    683682    size_t mtu)
    684683{
     
    787786 * @return              EINVAL if the service parameter is not known.
    788787 */
    789 static int eth_send_message(device_id_t device_id, packet_t packet,
     788static int eth_send_message(device_id_t device_id, packet_t *packet,
    790789    services_t sender)
    791790{
    792791        eth_device_t *device;
    793         packet_t next;
    794         packet_t tmp;
     792        packet_t *next;
     793        packet_t *tmp;
    795794        int ethertype;
    796795        int rc;
     
    841840{
    842841        measured_string_t *address;
    843         packet_t packet;
     842        packet_t *packet;
    844843        size_t addrlen;
    845844        size_t prefix;
     
    849848       
    850849        *answer_count = 0;
    851         switch (IPC_GET_METHOD(*call)) {
     850        switch (IPC_GET_IMETHOD(*call)) {
    852851        case IPC_M_PHONE_HUNGUP:
    853852                return EOK;
     
    926925                 * result.
    927926                 */
    928                 if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
     927                if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) ||
    929928                    (res == EHANGUP))
    930929                        return;
Note: See TracChangeset for help on using the changeset viewer.