Changes in / [ae972834:b278b4e] in mainline
- Files:
-
- 3 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rae972834 rb278b4e 534 534 ! CONFIG_WRITE_CORE_FILES (n/y) 535 535 536 % Bundle netif/nil network layer537 ! CONFIG_NETIF_NIL_BUNDLE (n/y)538 539 536 % Strip binaries 540 537 ! CONFIG_STRIP_BINARIES (n/y) -
uspace/lib/c/generic/net/socket_client.c
rae972834 rb278b4e 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 = { 180 .readers = 0, 181 .writers = 0, 182 .waiters = { 183 .prev = &socket_globals.lock.waiters, /* XXX */ 184 .next = &socket_globals.lock.waiters /* XXX */ 185 } 186 } 179 .lock = FIBRIL_RWLOCK_INITIALIZER(socket_globals.lock) 187 180 }; 188 181 … … 516 509 /** Sends message to the socket parent module with specified data. 517 510 * 518 * @param[in] socket_idSocket identifier.519 * 520 * 521 * 522 * 523 * 524 * 525 * 526 * 527 * 511 * @param[in] socket_id Socket 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. 528 521 */ 529 522 static int … … 805 798 /** Sends data via the socket to the remote address. 806 799 * 807 * 808 * 809 * 810 * 811 * 812 * 813 * 814 * 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 connected 815 808 * sockets. 816 * 817 * 818 * 819 * 820 * 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 is 821 814 * zero (0). 822 * 815 * @returns Other error codes as defined for the NET_SOCKET_SENDTO 823 816 * message. 824 817 */ … … 966 959 /** Receives data via the socket. 967 960 * 968 * 969 * @param[in] socket_idSocket identifier.970 * 971 * 972 * 973 * @param[out] fromaddrThe source address. May be NULL for connected sockets.974 * 961 * @param[in] message The action message. 962 * @param[in] socket_id Socket 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] fromaddr The source address. May be NULL for connected sockets. 967 * @param[in,out] addrlen The address length. The maximum address length is 975 968 * read. The actual address length is set. Used only if 976 969 * fromaddr is not NULL. 977 * 978 * 979 * 980 * 981 * 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. 982 975 */ 983 976 static int -
uspace/lib/c/include/fibril_synch.h
rae972834 rb278b4e 47 47 } fibril_mutex_t; 48 48 49 #define FIBRIL_MUTEX_INITIALIZE (name) \50 fibril_mutex_t name = {\49 #define FIBRIL_MUTEX_INITIALIZER(name) \ 50 { \ 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) 57 60 58 61 typedef struct { … … 62 65 } fibril_rwlock_t; 63 66 64 #define FIBRIL_RWLOCK_INITIALIZE (name) \65 fibril_rwlock_t name ={ \67 #define FIBRIL_RWLOCK_INITIALIZER(name) \ 68 { \ 66 69 .readers = 0, \ 67 70 .writers = 0, \ … … 72 75 } 73 76 77 #define FIBRIL_RWLOCK_INITIALIZE(name) \ 78 fibril_rwlock_t name = FIBRIL_RWLOCK_INITIALIZER(name) 79 74 80 typedef struct { 75 81 link_t waiters; 76 82 } fibril_condvar_t; 77 83 78 #define FIBRIL_CONDVAR_INITIALIZE (name) \79 fibril_condvar_t name ={ \84 #define FIBRIL_CONDVAR_INITIALIZER(name) \ 85 { \ 80 86 .waiters = { \ 81 87 .next = &name.waiters, \ … … 83 89 } \ 84 90 } 91 92 #define FIBRIL_CONDVAR_INITIALIZE(name) \ 93 fibril_condvar_t name = FIBRIL_CONDVAR_INITIALIZER(name) 85 94 86 95 extern void fibril_mutex_initialize(fibril_mutex_t *); -
uspace/lib/net/Makefile
rae972834 rb278b4e 41 41 netif/netif_local.c \ 42 42 netif/netif_remote.c \ 43 netif/netif_nil_bundle.c \44 43 nil/nil_remote.c \ 45 44 il/ip_remote.c \ -
uspace/lib/net/include/arp_interface.h
rae972834 rb278b4e 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.107 106 */ 108 107 extern int arp_connect_module(services_t service); 109 108 110 109 /** Returns the ARP task identifier. 111 * @returns The current task identifier if called by the bundle module.112 110 * @returns 0 if called by the remote module. 113 111 */ -
uspace/lib/net/include/ip_interface.h
rae972834 rb278b4e 44 44 #include <ip_codes.h> 45 45 46 #ifdef CONFIG_IL_TL_BUNDLE47 48 #include <ip_local.h>49 50 #define ip_received_error_msg ip_received_error_msg_local51 #define ip_set_gateway_req ip_set_gateway_req_local52 #define ip_packet_size_req ip_packet_size_req_local53 #define ip_device_req ip_device_req_local54 #define ip_add_route_req ip_add_route_req_local55 #define ip_send_msg ip_send_msg_local56 #define ip_get_route_req ip_get_route_req_local57 58 #else59 60 46 #include <ip_remote.h> 61 47 … … 67 53 #define ip_send_msg ip_send_msg_remote 68 54 #define ip_get_route_req ip_get_route_req_remote 69 70 #endif71 55 72 56 /** @name IP module interface … … 100 84 * @param service The IP module service. Ignored parameter. 101 85 * @returns The IP module phone on success. 102 * @returns 0 if called by the bundle module.103 86 */ 104 87 extern int ip_connect_module(services_t service); -
uspace/lib/net/include/net_interface.h
rae972834 rb278b4e 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.88 87 */ 89 88 extern int net_connect_module(services_t service); -
uspace/lib/net/include/netif_interface.h
rae972834 rb278b4e 34 34 #define __NET_NETIF_INTERFACE_H__ 35 35 36 #ifdef CONFIG_NETIF_NIL_BUNDLE37 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_message43 #define netif_module_start netif_nil_module_start44 #define netif_get_addr_req netif_get_addr_req_local45 #define netif_probe_req netif_probe_req_local46 #define netif_send_msg netif_send_msg_local47 #define netif_start_req netif_start_req_local48 #define netif_stop_req netif_stop_req_local49 #define netif_stats_req netif_stats_req_local50 #define netif_bind_service netif_bind_service_local51 52 #else /* CONFIG_NETIF_NIL_BUNDLE */53 54 36 #include <netif_remote.h> 55 37 #include <packet_client.h> … … 65 47 #define netif_bind_service netif_bind_service_remote 66 48 67 #endif /* CONFIG_NETIF_NIL_BUNDLE */68 69 49 #endif 70 50 -
uspace/lib/net/include/netif_local.h
rae972834 rb278b4e 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.37 36 */ 38 37 -
uspace/lib/net/include/nil_interface.h
rae972834 rb278b4e 68 68 69 69 70 #ifdef CONFIG_NETIF_NIL_BUNDLE71 72 #include <nil_local.h>73 #include <packet/packet_server.h>74 75 #define nil_device_state_msg nil_device_state_msg_local76 #define nil_received_msg nil_received_msg_local77 78 #else /* CONFIG_NETIF_NIL_BUNDLE */79 80 70 #include <nil_remote.h> 81 71 #include <packet/packet_server.h> … … 84 74 #define nil_received_msg nil_received_msg_remote 85 75 86 #endif /* CONFIG_NETIF_NIL_BUNDLE */87 88 76 #endif 89 77 -
uspace/lib/net/tl/tl_common.c
rae972834 rb278b4e 50 50 #include <net_device.h> 51 51 #include <icmp_interface.h> 52 #include <ip_local.h>53 52 #include <ip_remote.h> 54 53 #include <ip_interface.h> -
uspace/lib/socket/include/icmp_common.h
rae972834 rb278b4e 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.53 52 * @returns ETIMEOUT if the connection timeouted. 54 53 */ -
uspace/lib/socket/packet/packet_server.c
rae972834 rb278b4e 85 85 unsigned int count; 86 86 } ps_globals = { 87 .lock = { 88 .counter = 1, 89 .waiters = { 90 .prev = &ps_globals.lock.waiters, 91 .next = &ps_globals.lock.waiters, 92 } 93 }, 87 .lock = FIBRIL_MUTEX_INITIALIZER(ps_globals.lock), 94 88 .free = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}, 95 89 .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
rae972834 rb278b4e 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);629 625 } 630 626 -
uspace/srv/net/net/net_standalone.c
rae972834 rb278b4e 94 94 * @return EOK on success. 95 95 * @return ENOTSUP if the message is not known. 96 * @return Other error codes as defined for each bundled module 97 * message function. 96 * @return Other error codes. 98 97 * 99 98 */ -
uspace/srv/net/nil/eth/eth.c
rae972834 rb278b4e 788 788 } 789 789 790 #ifndef CONFIG_NETIF_NIL_BUNDLE791 792 790 /** Default thread for new connections. 793 791 * … … 839 837 } 840 838 841 #endif /* CONFIG_NETIF_NIL_BUNDLE */842 843 839 /** @} 844 840 */ -
uspace/srv/net/nil/nildummy/nildummy.c
rae972834 rb278b4e 410 410 } 411 411 412 #ifndef CONFIG_NETIF_NIL_BUNDLE413 414 412 /** Default thread for new connections. 415 413 * … … 461 459 } 462 460 463 #endif /* CONFIG_NETIF_NIL_BUNDLE */464 465 461 /** @} 466 462 */
Note:
See TracChangeset
for help on using the changeset viewer.