Changes in / [b278b4e:ae972834] in mainline
- Files:
-
- 3 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rb278b4e rae972834 534 534 ! CONFIG_WRITE_CORE_FILES (n/y) 535 535 536 % Bundle netif/nil network layer 537 ! CONFIG_NETIF_NIL_BUNDLE (n/y) 538 536 539 % Strip binaries 537 540 ! CONFIG_STRIP_BINARIES (n/y) -
uspace/lib/c/generic/net/socket_client.c
rb278b4e rae972834 27 27 */ 28 28 29 /** @addtogroup libc 29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 177 177 // .last_id = 0, 178 178 .sockets = NULL, 179 .lock = FIBRIL_RWLOCK_INITIALIZER(socket_globals.lock) 179 .lock = { 180 .readers = 0, 181 .writers = 0, 182 .waiters = { 183 .prev = &socket_globals.lock.waiters, /* XXX */ 184 .next = &socket_globals.lock.waiters /* XXX */ 185 } 186 } 180 187 }; 181 188 … … 509 516 /** Sends message to the socket parent module with specified data. 510 517 * 511 * @param[in] socket_idSocket identifier.512 * @param[in] message The action message.513 * @param[in] arg2 The second message parameter.514 * @param[in] data The data to be sent.515 * @param[in] datalength The data length.516 * @returns EOK on success.517 * @returns ENOTSOCK if the socket is not found.518 * @returns EBADMEM if the data parameter is NULL.519 * @returns NO_DATA if the datalength parameter is zero (0).520 * @returns Other error codes as defined for the spcific message.518 * @param[in] socket_id Socket identifier. 519 * @param[in] message The action message. 520 * @param[in] arg2 The second message parameter. 521 * @param[in] data The data to be sent. 522 * @param[in] datalength The data length. 523 * @returns EOK on success. 524 * @returns ENOTSOCK if the socket is not found. 525 * @returns EBADMEM if the data parameter is NULL. 526 * @returns NO_DATA if the datalength parameter is zero (0). 527 * @returns Other error codes as defined for the spcific message. 521 528 */ 522 529 static int … … 798 805 /** Sends data via the socket to the remote address. 799 806 * 800 * Binds the socket to a free port if not already connected/bound.801 * 802 * @param[in] message The action message.803 * @param[in] socket_id Socket identifier.804 * @param[in] data The data to be sent.805 * @param[in] datalength The data length.806 * @param[in] flags Various send flags.807 * @param[in] toaddr The destination address. May be NULL for connected807 * Binds the socket to a free port if not already connected/bound. 808 * 809 * @param[in] message The action message. 810 * @param[in] socket_id Socket identifier. 811 * @param[in] data The data to be sent. 812 * @param[in] datalength The data length. 813 * @param[in] flags Various send flags. 814 * @param[in] toaddr The destination address. May be NULL for connected 808 815 * sockets. 809 * @param[in] addrlen The address length. Used only if toaddr is not NULL.810 * @returns EOK on success.811 * @returns ENOTSOCK if the socket is not found.812 * @returns EBADMEM if the data or toaddr parameter is NULL.813 * @returns NO_DATA if the datalength or the addrlen parameter is816 * @param[in] addrlen The address length. Used only if toaddr is not NULL. 817 * @returns EOK on success. 818 * @returns ENOTSOCK if the socket is not found. 819 * @returns EBADMEM if the data or toaddr parameter is NULL. 820 * @returns NO_DATA if the datalength or the addrlen parameter is 814 821 * zero (0). 815 * @returns Other error codes as defined for the NET_SOCKET_SENDTO822 * @returns Other error codes as defined for the NET_SOCKET_SENDTO 816 823 * message. 817 824 */ … … 959 966 /** Receives data via the socket. 960 967 * 961 * @param[in] message The action message.962 * @param[in] socket_idSocket identifier.963 * @param[out] data The data buffer to be filled.964 * @param[in] datalength The data length.965 * @param[in] flags Various receive flags.966 * @param[out] fromaddrThe source address. May be NULL for connected sockets.967 * @param[in,out] addrlen The address length. The maximum address length is968 * @param[in] message The action message. 969 * @param[in] socket_id Socket identifier. 970 * @param[out] data The data buffer to be filled. 971 * @param[in] datalength The data length. 972 * @param[in] flags Various receive flags. 973 * @param[out] fromaddr The source address. May be NULL for connected sockets. 974 * @param[in,out] addrlen The address length. The maximum address length is 968 975 * read. The actual address length is set. Used only if 969 976 * fromaddr is not NULL. 970 * @returns EOK on success.971 * @returns ENOTSOCK if the socket is not found.972 * @returns EBADMEM if the data parameter is NULL.973 * @returns NO_DATA if the datalength or addrlen parameter is zero.974 * @returns Other error codes as defined for the spcific message.977 * @returns EOK on success. 978 * @returns ENOTSOCK if the socket is not found. 979 * @returns EBADMEM if the data parameter is NULL. 980 * @returns NO_DATA if the datalength or addrlen parameter is zero. 981 * @returns Other error codes as defined for the spcific message. 975 982 */ 976 983 static int -
uspace/lib/c/include/fibril_synch.h
rb278b4e rae972834 47 47 } fibril_mutex_t; 48 48 49 #define FIBRIL_MUTEX_INITIALIZE R(name) \50 {\49 #define FIBRIL_MUTEX_INITIALIZE(name) \ 50 fibril_mutex_t name = { \ 51 51 .counter = 1, \ 52 52 .waiters = { \ … … 55 55 } \ 56 56 } 57 58 #define FIBRIL_MUTEX_INITIALIZE(name) \59 fibril_mutex_t name = FIBRIL_MUTEX_INITIALIZER(name)60 57 61 58 typedef struct { … … 65 62 } fibril_rwlock_t; 66 63 67 #define FIBRIL_RWLOCK_INITIALIZE R(name) \68 { \64 #define FIBRIL_RWLOCK_INITIALIZE(name) \ 65 fibril_rwlock_t name = { \ 69 66 .readers = 0, \ 70 67 .writers = 0, \ … … 75 72 } 76 73 77 #define FIBRIL_RWLOCK_INITIALIZE(name) \78 fibril_rwlock_t name = FIBRIL_RWLOCK_INITIALIZER(name)79 80 74 typedef struct { 81 75 link_t waiters; 82 76 } fibril_condvar_t; 83 77 84 #define FIBRIL_CONDVAR_INITIALIZE R(name) \85 { \78 #define FIBRIL_CONDVAR_INITIALIZE(name) \ 79 fibril_condvar_t name = { \ 86 80 .waiters = { \ 87 81 .next = &name.waiters, \ … … 89 83 } \ 90 84 } 91 92 #define FIBRIL_CONDVAR_INITIALIZE(name) \93 fibril_condvar_t name = FIBRIL_CONDVAR_INITIALIZER(name)94 85 95 86 extern void fibril_mutex_initialize(fibril_mutex_t *); -
uspace/lib/net/Makefile
rb278b4e rae972834 41 41 netif/netif_local.c \ 42 42 netif/netif_remote.c \ 43 netif/netif_nil_bundle.c \ 43 44 nil/nil_remote.c \ 44 45 il/ip_remote.c \ -
uspace/lib/net/include/arp_interface.h
rb278b4e rae972834 104 104 * @param service The ARP module service. Ignored parameter. 105 105 * @returns The ARP module phone on success. 106 * @returns 0 if called by the bundle module. 106 107 */ 107 108 extern int arp_connect_module(services_t service); 108 109 109 110 /** Returns the ARP task identifier. 111 * @returns The current task identifier if called by the bundle module. 110 112 * @returns 0 if called by the remote module. 111 113 */ -
uspace/lib/net/include/ip_interface.h
rb278b4e rae972834 44 44 #include <ip_codes.h> 45 45 46 #ifdef CONFIG_IL_TL_BUNDLE 47 48 #include <ip_local.h> 49 50 #define ip_received_error_msg ip_received_error_msg_local 51 #define ip_set_gateway_req ip_set_gateway_req_local 52 #define ip_packet_size_req ip_packet_size_req_local 53 #define ip_device_req ip_device_req_local 54 #define ip_add_route_req ip_add_route_req_local 55 #define ip_send_msg ip_send_msg_local 56 #define ip_get_route_req ip_get_route_req_local 57 58 #else 59 46 60 #include <ip_remote.h> 47 61 … … 53 67 #define ip_send_msg ip_send_msg_remote 54 68 #define ip_get_route_req ip_get_route_req_remote 69 70 #endif 55 71 56 72 /** @name IP module interface … … 84 100 * @param service The IP module service. Ignored parameter. 85 101 * @returns The IP module phone on success. 102 * @returns 0 if called by the bundle module. 86 103 */ 87 104 extern int ip_connect_module(services_t service); -
uspace/lib/net/include/net_interface.h
rb278b4e rae972834 85 85 * @param service The networking module service. Ignored parameter. 86 86 * @returns The networking module phone on success. 87 * @returns 0 if called by the bundle module. 87 88 */ 88 89 extern int net_connect_module(services_t service); -
uspace/lib/net/include/netif_interface.h
rb278b4e rae972834 34 34 #define __NET_NETIF_INTERFACE_H__ 35 35 36 #ifdef CONFIG_NETIF_NIL_BUNDLE 37 38 #include <netif_local.h> 39 #include <netif_nil_bundle.h> 40 #include <packet/packet_server.h> 41 42 #define netif_module_message netif_nil_module_message 43 #define netif_module_start netif_nil_module_start 44 #define netif_get_addr_req netif_get_addr_req_local 45 #define netif_probe_req netif_probe_req_local 46 #define netif_send_msg netif_send_msg_local 47 #define netif_start_req netif_start_req_local 48 #define netif_stop_req netif_stop_req_local 49 #define netif_stats_req netif_stats_req_local 50 #define netif_bind_service netif_bind_service_local 51 52 #else /* CONFIG_NETIF_NIL_BUNDLE */ 53 36 54 #include <netif_remote.h> 37 55 #include <packet_client.h> … … 47 65 #define netif_bind_service netif_bind_service_remote 48 66 67 #endif /* CONFIG_NETIF_NIL_BUNDLE */ 68 49 69 #endif 50 70 -
uspace/lib/net/include/netif_local.h
rb278b4e rae972834 34 34 * Network interface module skeleton. 35 35 * The skeleton has to be part of each network interface module. 36 * The skeleton can be also part of the module bundled with the network interface layer. 36 37 */ 37 38 -
uspace/lib/net/include/nil_interface.h
rb278b4e rae972834 68 68 69 69 70 #ifdef CONFIG_NETIF_NIL_BUNDLE 71 72 #include <nil_local.h> 73 #include <packet/packet_server.h> 74 75 #define nil_device_state_msg nil_device_state_msg_local 76 #define nil_received_msg nil_received_msg_local 77 78 #else /* CONFIG_NETIF_NIL_BUNDLE */ 79 70 80 #include <nil_remote.h> 71 81 #include <packet/packet_server.h> … … 74 84 #define nil_received_msg nil_received_msg_remote 75 85 86 #endif /* CONFIG_NETIF_NIL_BUNDLE */ 87 76 88 #endif 77 89 -
uspace/lib/net/tl/tl_common.c
rb278b4e rae972834 50 50 #include <net_device.h> 51 51 #include <icmp_interface.h> 52 #include <ip_local.h> 52 53 #include <ip_remote.h> 53 54 #include <ip_interface.h> -
uspace/lib/socket/include/icmp_common.h
rb278b4e rae972834 50 50 * @param[in] timeout The connection timeout in microseconds. No timeout if set to zero (0). 51 51 * @returns The ICMP module phone on success. 52 * @returns The ICMP socket identifier if called by the bundle module. 52 53 * @returns ETIMEOUT if the connection timeouted. 53 54 */ -
uspace/lib/socket/packet/packet_server.c
rb278b4e rae972834 85 85 unsigned int count; 86 86 } ps_globals = { 87 .lock = FIBRIL_MUTEX_INITIALIZER(ps_globals.lock), 87 .lock = { 88 .counter = 1, 89 .waiters = { 90 .prev = &ps_globals.lock.waiters, 91 .next = &ps_globals.lock.waiters, 92 } 93 }, 88 94 .free = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}, 89 95 .sizes = {PAGE_SIZE, PAGE_SIZE * 2, PAGE_SIZE * 4, PAGE_SIZE * 8, PAGE_SIZE * 16, PAGE_SIZE * 32, PAGE_SIZE * 64}, -
uspace/srv/net/il/ip/ip.c
rb278b4e rae972834 623 623 int ip_connect_module(services_t service){ 624 624 return EOK; 625 } 626 627 int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t received_msg){ 628 return ip_register(protocol, me, 0, received_msg); 625 629 } 626 630 -
uspace/srv/net/net/net_standalone.c
rb278b4e rae972834 94 94 * @return EOK on success. 95 95 * @return ENOTSUP if the message is not known. 96 * @return Other error codes. 96 * @return Other error codes as defined for each bundled module 97 * message function. 97 98 * 98 99 */ -
uspace/srv/net/nil/eth/eth.c
rb278b4e rae972834 788 788 } 789 789 790 #ifndef CONFIG_NETIF_NIL_BUNDLE 791 790 792 /** Default thread for new connections. 791 793 * … … 837 839 } 838 840 841 #endif /* CONFIG_NETIF_NIL_BUNDLE */ 842 839 843 /** @} 840 844 */ -
uspace/srv/net/nil/nildummy/nildummy.c
rb278b4e rae972834 410 410 } 411 411 412 #ifndef CONFIG_NETIF_NIL_BUNDLE 413 412 414 /** Default thread for new connections. 413 415 * … … 459 461 } 460 462 463 #endif /* CONFIG_NETIF_NIL_BUNDLE */ 464 461 465 /** @} 462 466 */
Note:
See TracChangeset
for help on using the changeset viewer.