Changeset 973ef9fc in mainline for uspace/srv/net/nil/eth/eth.c
- Timestamp:
- 2010-12-25T21:20:28Z (13 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/nil/eth/eth.c
r1bfd3d3 r973ef9fc 201 201 202 202 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); 205 204 if (!eth_globals.broadcast_addr) { 206 205 rc = ENOMEM; … … 234 233 static void eth_receiver(ipc_callid_t iid, ipc_call_t *icall) 235 234 { 236 packet_t packet;235 packet_t *packet; 237 236 int rc; 238 237 239 238 while (true) { 240 switch (IPC_GET_ METHOD(*icall)) {239 switch (IPC_GET_IMETHOD(*icall)) { 241 240 case NET_NIL_DEVICE_STATE: 242 241 nil_device_state_msg_local(0, IPC_GET_DEVICE(icall), … … 251 250 IPC_GET_DEVICE(icall), packet, 0); 252 251 } 253 ipc_answer_0(iid, ( ipcarg_t) rc);252 ipc_answer_0(iid, (sysarg_t) rc); 254 253 break; 255 254 default: 256 ipc_answer_0(iid, ( ipcarg_t) ENOTSUP);255 ipc_answer_0(iid, (sysarg_t) ENOTSUP); 257 256 } 258 257 … … 315 314 device->mtu = ETH_MAX_TAGGED_CONTENT(device->flags); 316 315 317 printf("Device %d already exists:\tMTU\t= % d\n",316 printf("Device %d already exists:\tMTU\t= %zu\n", 318 317 device->device_id, device->mtu); 319 318 fibril_rwlock_write_unlock(ð_globals.devices_lock); … … 407 406 } 408 407 409 printf("%s: Device registered (id: %d, service: %d: mtu: % d, "408 printf("%s: Device registered (id: %d, service: %d: mtu: %zu, " 410 409 "mac: %x:%x:%x:%x:%x:%x, flags: 0x%x)\n", 411 410 NAME, device->device_id, device->service, device->mtu, … … 429 428 * @return NULL if the packet address length is not big enough. 430 429 */ 431 static eth_proto_t *eth_process_packet(int flags, packet_t packet)430 static eth_proto_t *eth_process_packet(int flags, packet_t *packet) 432 431 { 433 432 eth_header_snap_t *header; … … 509 508 510 509 int 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) 512 511 { 513 512 eth_proto_t *proto; 514 packet_t next;513 packet_t *next; 515 514 eth_device_t *device; 516 515 int flags; … … 680 679 */ 681 680 static int 682 eth_prepare_packet(int flags, packet_t packet, uint8_t *src_addr, int ethertype,681 eth_prepare_packet(int flags, packet_t *packet, uint8_t *src_addr, int ethertype, 683 682 size_t mtu) 684 683 { … … 787 786 * @return EINVAL if the service parameter is not known. 788 787 */ 789 static int eth_send_message(device_id_t device_id, packet_t packet,788 static int eth_send_message(device_id_t device_id, packet_t *packet, 790 789 services_t sender) 791 790 { 792 791 eth_device_t *device; 793 packet_t next;794 packet_t tmp;792 packet_t *next; 793 packet_t *tmp; 795 794 int ethertype; 796 795 int rc; … … 841 840 { 842 841 measured_string_t *address; 843 packet_t packet;842 packet_t *packet; 844 843 size_t addrlen; 845 844 size_t prefix; … … 849 848 850 849 *answer_count = 0; 851 switch (IPC_GET_ METHOD(*call)) {850 switch (IPC_GET_IMETHOD(*call)) { 852 851 case IPC_M_PHONE_HUNGUP: 853 852 return EOK; … … 926 925 * result. 927 926 */ 928 if ((IPC_GET_ METHOD(call) == IPC_M_PHONE_HUNGUP) ||927 if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) || 929 928 (res == EHANGUP)) 930 929 return;
Note:
See TracChangeset
for help on using the changeset viewer.