Changeset 849ed54 in mainline for uspace/srv/hw/netif
- Timestamp:
- 2010-03-30T18:39:04Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7553689
- Parents:
- 7d6fe4db
- Location:
- uspace/srv/hw/netif/dp8390
- Files:
-
- 9 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/Makefile
r7d6fe4db r849ed54 28 28 # 29 29 30 NET_BASE = ../..31 30 USPACE_PREFIX = ../../../.. 32 31 ROOT_PATH = $(USPACE_PREFIX)/.. 32 LIBS = $(LIBNET_PREFIX)/libnet.a $(LIBSOCKET_PREFIX)/libsocket.a 33 EXTRA_CFLAGS = -I$(LIBNET_PREFIX)/include -I$(LIBSOCKET_PREFIX)/include 33 34 34 35 COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common 35 36 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config 36 37 37 BINARY = dp839038 39 38 -include $(COMMON_MAKEFILE) 40 39 -include $(CONFIG_MAKEFILE) 40 41 ifeq ($(CONFIG_NETWORKING),modular) 42 BINARY = dp8390 43 endif 44 45 ifeq ($(CONFIG_NETWORKING),module) 46 LIBRARY = libdp8390 47 endif 41 48 42 49 SOURCES = \ 43 50 dp8390.c \ 44 51 dp8390_module.c \ 45 ne2000.c \ 46 $(NET_BASE)/module.c \ 47 $(NET_BASE)/modules.c \ 48 $(NET_BASE)/netif/netif.c \ 49 $(NET_BASE)/structures/measured_strings.c \ 50 $(NET_BASE)/structures/packet/packet.c \ 51 $(NET_BASE)/structures/packet/packet_client.c \ 52 $(NET_BASE)/structures/packet/packet_remote.c 53 54 ifeq ($(CONFIG_NETWORKING),module) 55 SOURCES += \ 56 $(NET_BASE)/checksum.c \ 57 $(NET_BASE)/nil/eth/eth.c \ 58 $(NET_BASE)/net/net_remote.c \ 59 $(NET_BASE)/netif/netif_nil_bundle.c 60 endif 61 62 ifeq ($(CONFIG_NETWORKING),modular) 63 SOURCES += \ 64 $(NET_BASE)/nil/nil_remote.c \ 65 $(NET_BASE)/netif/netif_standalone.c 66 endif 52 ne2000.c 67 53 68 54 include $(USPACE_PREFIX)/Makefile.common -
uspace/srv/hw/netif/dp8390/dp8390.c
r7d6fe4db r849ed54 36 36 #include <errno.h> 37 37 38 #include "../../include/byteorder.h"39 40 #include "../../structures/packet/packet.h"41 #include "../../structures/packet/packet_client.h"42 43 #include "../netif.h"38 #include <net_byteorder.h> 39 40 #include <packet/packet.h> 41 #include <packet/packet_client.h> 42 43 #include <netif.h> 44 44 45 45 #include "dp8390_drv.h" -
uspace/srv/hw/netif/dp8390/dp8390.h
r7d6fe4db r849ed54 36 36 #define __NET_NETIF_DP8390_H__ 37 37 38 #include "../../structures/packet/packet.h"38 #include <packet/packet.h> 39 39 40 40 #include "dp8390_port.h" -
uspace/srv/hw/netif/dp8390/dp8390_module.c
r7d6fe4db r849ed54 40 40 #include <errno.h> 41 41 #include <malloc.h> 42 //#include <stdio.h>43 42 #include <ipc/ipc.h> 44 43 #include <ipc/services.h> 45 44 46 #include "../../err.h" 47 #include "../../messages.h" 48 #include "../../modules.h" 49 50 #include "../../structures/packet/packet_client.h" 51 #include "../../structures/measured_strings.h" 52 53 #include "../../include/device.h" 54 #include "../../include/nil_interface.h" 55 56 #include "../netif.h" 57 #include "../netif_module.h" 45 #include <net_err.h> 46 #include <net_messages.h> 47 #include <net_modules.h> 48 #include <packet/packet_client.h> 49 #include <adt/measured_strings.h> 50 #include <net_device.h> 51 #include <nil_interface.h> 52 #include <netif.h> 53 #include <netif_module.h> 58 54 59 55 #include "dp8390.h" … … 102 98 */ 103 99 netif_globals_t netif_globals; 104 105 /** Prints the module name.106 * @see NAME107 */108 void module_print_name(void);109 100 110 101 /** Handles the interrupt messages. … … 151 142 stats->send_window_errors = de_stat->ets_OWC; 152 143 return EOK; 153 }154 155 void module_print_name(void){156 printf("%s", NAME);157 144 } 158 145 … … 329 316 } 330 317 318 #ifdef CONFIG_NETWORKING_modular 319 320 #include <netif_standalone.h> 321 322 /** Default thread for new connections. 323 * 324 * @param[in] iid The initial message identifier. 325 * @param[in] icall The initial message call structure. 326 * 327 */ 328 static void netif_client_connection(ipc_callid_t iid, ipc_call_t * icall) 329 { 330 /* 331 * Accept the connection 332 * - Answer the first IPC_M_CONNECT_ME_TO call. 333 */ 334 ipc_answer_0(iid, EOK); 335 336 while(true) { 337 ipc_call_t answer; 338 int answer_count; 339 340 /* Clear the answer structure */ 341 refresh_answer(&answer, &answer_count); 342 343 /* Fetch the next message */ 344 ipc_call_t call; 345 ipc_callid_t callid = async_get_call(&call); 346 347 /* Process the message */ 348 int res = netif_module_message(callid, &call, &answer, &answer_count); 349 350 /* End if said to either by the message or the processing result */ 351 if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP)) 352 return; 353 354 /* Answer the message */ 355 answer_call(callid, res, &answer, answer_count); 356 } 357 } 358 359 /** Starts the module. 360 * 361 * @param argc The count of the command line arguments. Ignored parameter. 362 * @param argv The command line parameters. Ignored parameter. 363 * 364 * @returns EOK on success. 365 * @returns Other error codes as defined for each specific module start function. 366 * 367 */ 368 int main(int argc, char *argv[]) 369 { 370 ERROR_DECLARE; 371 372 /* Print the module label */ 373 printf("Task %d - %s\n", task_get_id(), NAME); 374 375 /* Start the module */ 376 if (ERROR_OCCURRED(netif_module_start(netif_client_connection))) { 377 printf(" - ERROR %i\n", ERROR_CODE); 378 return ERROR_CODE; 379 } 380 381 return EOK; 382 } 383 384 #endif /* CONFIG_NETWORKING_modular */ 385 386 331 387 /** @} 332 388 */
Note:
See TracChangeset
for help on using the changeset viewer.