Changeset c2a6983 in mainline for uspace/lib/c/include
- Timestamp:
- 2013-10-13T20:59:33Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 12d6c98
- Parents:
- 820104d (diff), 39bcc99 (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. - Location:
- uspace/lib/c/include
- Files:
-
- 7 added
- 1 deleted
- 25 edited
- 2 moved
-
adt/list.h (modified) (4 diffs)
-
async.h (modified) (2 diffs)
-
cfg.h (modified) (2 diffs)
-
corecfg.h (added)
-
ddi.h (modified) (4 diffs)
-
device/hw_res.h (modified) (3 diffs)
-
device/hw_res_parsed.h (modified) (3 diffs)
-
device/pio_window.h (added)
-
devman.h (modified) (2 diffs)
-
inet/addr.h (modified) (7 diffs)
-
inet/dhcp.h (added)
-
inet/dnsr.h (modified) (1 diff)
-
inet/inet.h (modified) (1 diff)
-
inet/inetcfg.h (modified) (2 diffs)
-
inet/inetping.h (modified) (3 diffs)
-
inet/iplink.h (modified) (2 diffs)
-
inet/iplink_srv.h (modified) (2 diffs)
-
ipc/corecfg.h (added)
-
ipc/dev_iface.h (modified) (3 diffs)
-
ipc/devman.h (modified) (3 diffs)
-
ipc/dhcp.h (added)
-
ipc/inet.h (modified) (2 diffs)
-
ipc/services.h (modified) (2 diffs)
-
ipc/socket.h (modified) (1 diff)
-
ipc/vfs.h (modified) (2 diffs)
-
macros.h (modified) (1 diff)
-
net/ip_codes.h (deleted)
-
net/socket.h (modified) (1 diff)
-
net/socket_codes.h (modified) (1 diff)
-
stdio.h (modified) (1 diff)
-
sys/statfs.h (added)
-
types/inet.h (moved) (moved from uspace/lib/c/include/net/device.h ) (2 diffs)
-
types/inetcfg.h (added)
-
types/inetping.h (moved) (moved from uspace/lib/c/include/inet/inetping6.h ) (2 diffs)
-
vfs/vfs.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/list.h
r820104d rc2a6983 1 1 /* 2 2 * Copyright (c) 2001-2004 Jakub Jermar 3 * Copyright (c) 201 1Jiri Svoboda3 * Copyright (c) 2013 Jiri Svoboda 4 4 * All rights reserved. 5 5 * … … 65 65 66 66 #define list_get_instance(link, type, member) \ 67 ((type *) (((void *)(link)) - ((void *) &(((type *) NULL)->member)))) 68 69 #define list_foreach(list, iterator) \ 70 for (link_t *iterator = (list).head.next; \ 71 iterator != &(list).head; iterator = iterator->next) 67 ((type *) (((void *)(link)) - list_link_to_void(&(((type *) NULL)->member)))) 68 69 #define list_foreach(list, member, itype, iterator) \ 70 for (itype *iterator = NULL; iterator == NULL; iterator = (itype *) 1) \ 71 for (link_t *_link = (list).head.next; \ 72 iterator = list_get_instance(_link, itype, member), \ 73 _link != &(list).head; _link = _link->next) 72 74 73 75 /** Unlike list_foreach(), allows removing items while traversing a list. 74 * 76 * 75 77 * @code 76 78 * list_t mylist; … … 238 240 static inline link_t *list_last(list_t *list) 239 241 { 240 return ((list->head.prev == &list->head) ? NULL : list->head.prev); 242 return (list->head.prev == &list->head) ? NULL : list->head.prev; 243 } 244 245 /** Get next item in list. 246 * 247 * @param link Current item link 248 * @param list List containing @a link 249 * 250 * @return Next item or NULL if @a link is the last item. 251 * 252 */ 253 static inline link_t *list_next(link_t *link, const list_t *list) 254 { 255 return (link->next == &list->head) ? NULL : link->next; 256 } 257 258 /** Get previous item in list. 259 * 260 * @param link Current item link 261 * @param list List containing @a link 262 * 263 * @return Previous item or NULL if @a link is the first item. 264 * 265 */ 266 static inline link_t *list_prev(link_t *link, const list_t *list) 267 { 268 return (link->prev == &list->head) ? NULL : link->prev; 241 269 } 242 270 … … 308 336 unsigned int cnt = 0; 309 337 310 list_foreach(*list, link) { 338 link_t *link = list_first(list); 339 while (link != NULL) { 311 340 if (cnt == n) 312 341 return link; 313 342 314 343 cnt++; 344 link = list_next(link, list); 315 345 } 316 346 317 347 return NULL; 348 } 349 350 /** Verify that argument type is a pointer to link_t (at compile time). 351 * 352 * This can be used to check argument type in a macro. 353 */ 354 static inline const void *list_link_to_void(const link_t *link) 355 { 356 return link; 318 357 } 319 358 -
uspace/lib/c/include/async.h
r820104d rc2a6983 399 399 extern int async_data_read_start(async_exch_t *, void *, size_t); 400 400 extern bool async_data_read_receive(ipc_callid_t *, size_t *); 401 extern bool async_data_read_receive_call(ipc_callid_t *, ipc_call_t *, size_t *); 401 402 extern int async_data_read_finalize(ipc_callid_t, const void *, size_t); 402 403 … … 437 438 extern int async_data_write_start(async_exch_t *, const void *, size_t); 438 439 extern bool async_data_write_receive(ipc_callid_t *, size_t *); 440 extern bool async_data_write_receive_call(ipc_callid_t *, ipc_call_t *, size_t *); 439 441 extern int async_data_write_finalize(ipc_callid_t, void *, size_t); 440 442 -
uspace/lib/c/include/cfg.h
r820104d rc2a6983 80 80 81 81 #define cfg_file_foreach(file, cur) \ 82 list_foreach((file)->sections, (cur))82 list_foreach((file)->sections, link, const cfg_section_t, (cur)) 83 83 84 84 #define cfg_section_instance(cur) \ … … 86 86 87 87 #define cfg_section_foreach(section, cur) \ 88 list_foreach((section)->entries, (cur))88 list_foreach((section)->entries, link, const cfg_entry_t, (cur)) 89 89 90 90 #define cfg_entry_instance(cur) \ -
uspace/lib/c/include/ddi.h
r820104d rc2a6983 40 40 #include <sys/time.h> 41 41 #include <abi/ddi/irq.h> 42 #include <device/hw_res.h> 43 #include <device/hw_res_parsed.h> 44 #include <device/pio_window.h> 42 45 #include <task.h> 46 47 #define DMAMEM_16MiB ((uintptr_t) UINT64_C(0xffffffffff000000)) 48 #define DMAMEM_4GiB ((uintptr_t) UINT64_C(0xffffffff00000000)) 43 49 44 50 extern int device_assign_devno(void); 45 51 46 extern int physmem_map( void *, size_t, unsigned int, void **);52 extern int physmem_map(uintptr_t, size_t, unsigned int, void **); 47 53 48 extern int dmamem_map(void *, size_t, unsigned int, unsigned int, void **);49 extern int dmamem_map_anonymous(size_t, u nsigned int, unsigned int, void **,50 void **);54 extern int dmamem_map(void *, size_t, unsigned int, unsigned int, uintptr_t *); 55 extern int dmamem_map_anonymous(size_t, uintptr_t, unsigned int, unsigned int, 56 uintptr_t *, void **); 51 57 extern int dmamem_unmap(void *, size_t); 52 58 extern int dmamem_unmap_anonymous(void *); 53 59 60 extern int pio_enable_range(addr_range_t *, void **); 61 extern int pio_enable_resource(pio_window_t *, hw_resource_t *, void **); 54 62 extern int pio_enable(void *, size_t, void **); 55 63 … … 69 77 extern uint32_t pio_read_32(const ioport32_t *); 70 78 71 static inline uint8_t pio_change_8( 72 ioport8_t *reg, uint8_t val, uint8_t mask,useconds_t delay)79 static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask, 80 useconds_t delay) 73 81 { 74 82 uint8_t v = pio_read_8(reg); … … 78 86 } 79 87 80 static inline uint16_t pio_change_16( 81 ioport16_t *reg, uint16_t val,uint16_t mask, useconds_t delay)88 static inline uint16_t pio_change_16(ioport16_t *reg, uint16_t val, 89 uint16_t mask, useconds_t delay) 82 90 { 83 91 uint16_t v = pio_read_16(reg); … … 87 95 } 88 96 89 static inline uint32_t pio_change_32( 90 ioport32_t *reg, uint32_t val,uint32_t mask, useconds_t delay)97 static inline uint32_t pio_change_32(ioport32_t *reg, uint32_t val, 98 uint32_t mask, useconds_t delay) 91 99 { 92 100 uint32_t v = pio_read_32(reg); -
uspace/lib/c/include/device/hw_res.h
r820104d rc2a6983 53 53 HW_RES_ENABLE_INTERRUPT, 54 54 HW_RES_DMA_CHANNEL_SETUP, 55 HW_RES_DMA_CHANNEL_REMAIN, 55 56 } hw_res_method_t; 56 57 … … 75 76 struct { 76 77 uint64_t address; 78 size_t size; 79 bool relative; 77 80 endianness_t endianness; 78 size_t size;79 81 } mem_range; 80 82 81 83 struct { 82 84 uint64_t address; 85 size_t size; 86 bool relative; 83 87 endianness_t endianness; 84 size_t size;85 88 } io_range; 86 89 … … 115 118 116 119 extern int hw_res_dma_channel_setup(async_sess_t *, unsigned int, uint32_t, 117 uint16_t, uint8_t); 120 uint32_t, uint8_t); 121 extern int hw_res_dma_channel_remain(async_sess_t *, unsigned); 118 122 119 123 #endif -
uspace/lib/c/include/device/hw_res_parsed.h
r820104d rc2a6983 37 37 38 38 #include <device/hw_res.h> 39 #include <device/pio_window.h> 39 40 #include <str.h> 40 41 … … 45 46 #define HW_RES_KEEP_DUPLICIT 0x2 46 47 48 49 #define RNGABS(rng) (rng).address.absolute 50 #define RNGREL(rng) (rng).address.relative 51 #define RNGSZ(rng) (rng).size 52 53 #define RNGABSPTR(rng) ((void *) ((uintptr_t) RNGABS((rng)))) 54 55 typedef struct address64 { 56 /** Aboslute address. */ 57 uint64_t absolute; 58 /** PIO window base relative address. */ 59 uint64_t relative; 60 } address64_t; 61 47 62 /** Address range structure */ 48 63 typedef struct addr_range { 49 64 /** Start address */ 50 uint64_t address; 51 52 /** Endianness */ 53 endianness_t endianness; 65 address64_t address; 54 66 55 67 /** Area size */ 56 68 size_t size; 69 70 /** Endianness */ 71 endianness_t endianness; 57 72 } addr_range_t; 58 73 … … 139 154 } 140 155 141 extern int hw_res_list_parse(hw_resource_list_t *, hw_res_list_parsed_t *, int); 156 extern int hw_res_list_parse(const pio_window_t *, const hw_resource_list_t *, 157 hw_res_list_parsed_t *, int); 142 158 extern int hw_res_get_list_parsed(async_sess_t *, hw_res_list_parsed_t *, int); 143 159 -
uspace/lib/c/include/devman.h
r820104d rc2a6983 61 61 unsigned int); 62 62 extern int devman_fun_get_child(devman_handle_t, devman_handle_t *); 63 extern int devman_dev_get_parent(devman_handle_t, devman_handle_t *); 63 64 extern int devman_dev_get_functions(devman_handle_t, devman_handle_t **, 64 65 size_t *); 66 extern int devman_fun_get_match_id(devman_handle_t, size_t, char *, size_t, 67 unsigned int *); 65 68 extern int devman_fun_get_name(devman_handle_t, char *, size_t); 66 69 extern int devman_fun_get_driver_name(devman_handle_t, char *, size_t); … … 71 74 extern int devman_add_device_to_category(devman_handle_t, const char *); 72 75 extern int devman_fun_sid_to_handle(service_id_t, devman_handle_t *); 76 extern int devman_get_drivers(devman_handle_t **, size_t *); 77 extern int devman_driver_get_devices(devman_handle_t, devman_handle_t **, 78 size_t *); 79 extern int devman_driver_get_handle(const char *, devman_handle_t *); 80 extern int devman_driver_get_match_id(devman_handle_t, size_t, char *, size_t, 81 unsigned int *); 82 extern int devman_driver_get_name(devman_handle_t, char *, size_t); 83 extern int devman_driver_get_state(devman_handle_t, driver_state_t *); 84 extern int devman_driver_load(devman_handle_t); 73 85 74 86 #endif -
uspace/lib/c/include/inet/addr.h
r820104d rc2a6983 39 39 #include <net/in.h> 40 40 #include <net/in6.h> 41 #include <net/socket.h> 41 42 42 43 typedef uint32_t addr32_t; … … 44 45 typedef uint8_t addr128_t[16]; 45 46 47 typedef enum { 48 /** Any IP protocol version */ 49 ip_any, 50 /** IPv4 */ 51 ip_v4, 52 /** IPv6 */ 53 ip_v6 54 } ip_ver_t; 55 46 56 /** Node address */ 47 57 typedef struct { 48 uint16_t family; 58 /** IP version */ 59 ip_ver_t version; 49 60 union { 50 61 addr32_t addr; … … 55 66 /** Network address */ 56 67 typedef struct { 57 /** Address family*/58 uint16_t family;68 /** IP version */ 69 ip_ver_t version; 59 70 60 71 /** Address */ … … 68 79 } inet_naddr_t; 69 80 81 extern const addr32_t addr32_broadcast_all_hosts; 70 82 extern const addr48_t addr48_broadcast; 71 83 … … 90 102 uint16_t, uint16_t, uint16_t, uint16_t, uint8_t); 91 103 92 extern int inet_addr_family(const char *, uint16_t *);93 104 extern void inet_naddr_addr(const inet_naddr_t *, inet_addr_t *); 94 105 extern void inet_addr_naddr(const inet_addr_t *, uint8_t, inet_naddr_t *); … … 109 120 extern int inet_naddr_format(const inet_naddr_t *, char **); 110 121 111 extern uint16_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *);112 extern uint16_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *,122 extern ip_ver_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *); 123 extern ip_ver_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *, 113 124 uint8_t *); 114 125 … … 124 135 sockaddr_in6_t *); 125 136 137 extern ip_ver_t ipver_from_af(int af); 138 extern int inet_addr_sockaddr(const inet_addr_t *, uint16_t, sockaddr_t **, 139 socklen_t *); 140 126 141 #endif 127 142 -
uspace/lib/c/include/inet/dnsr.h
r820104d rc2a6983 51 51 52 52 extern int dnsr_init(void); 53 extern int dnsr_name2host(const char *, dnsr_hostinfo_t **, uint16_t);53 extern int dnsr_name2host(const char *, dnsr_hostinfo_t **, ip_ver_t); 54 54 extern void dnsr_hostinfo_destroy(dnsr_hostinfo_t *); 55 55 extern int dnsr_get_srvaddr(inet_addr_t *); -
uspace/lib/c/include/inet/inet.h
r820104d rc2a6983 37 37 38 38 #include <inet/addr.h> 39 #include <ipc/loc.h> 39 40 #include <sys/types.h> 40 41 #define INET_TTL_MAX 255 42 43 typedef struct { 44 inet_addr_t src; 45 inet_addr_t dest; 46 uint8_t tos; 47 void *data; 48 size_t size; 49 } inet_dgram_t; 50 51 typedef struct { 52 int (*recv)(inet_dgram_t *); 53 } inet_ev_ops_t; 54 55 typedef enum { 56 INET_DF = 1 57 } inet_df_t; 41 #include <types/inet.h> 58 42 59 43 extern int inet_init(uint8_t, inet_ev_ops_t *); -
uspace/lib/c/include/inet/inetcfg.h
r820104d rc2a6983 38 38 #include <inet/inet.h> 39 39 #include <sys/types.h> 40 41 /** Address object info */ 42 typedef struct { 43 /** Network address */ 44 inet_naddr_t naddr; 45 /** Link service ID */ 46 sysarg_t ilink; 47 /** Address object name */ 48 char *name; 49 } inet_addr_info_t; 50 51 /** IP link info */ 52 typedef struct { 53 /** Link service name */ 54 char *name; 55 /** Default MTU */ 56 size_t def_mtu; 57 } inet_link_info_t; 58 59 /** Static route info */ 60 typedef struct { 61 /** Destination network address */ 62 inet_naddr_t dest; 63 /** Router address */ 64 inet_addr_t router; 65 /** Static route name */ 66 char *name; 67 } inet_sroute_info_t; 40 #include <types/inetcfg.h> 68 41 69 42 extern int inetcfg_init(void); … … 75 48 extern int inetcfg_get_link_list(sysarg_t **, size_t *); 76 49 extern int inetcfg_get_sroute_list(sysarg_t **, size_t *); 50 extern int inetcfg_link_add(sysarg_t); 77 51 extern int inetcfg_link_get(sysarg_t, inet_link_info_t *); 52 extern int inetcfg_link_remove(sysarg_t); 78 53 extern int inetcfg_sroute_get(sysarg_t, inet_sroute_info_t *); 79 54 extern int inetcfg_sroute_get_id(const char *, sysarg_t *); -
uspace/lib/c/include/inet/inetping.h
r820104d rc2a6983 1 1 /* 2 * Copyright (c) 201 2Jiri Svoboda2 * Copyright (c) 2013 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 38 38 #include <inet/inet.h> 39 39 #include <sys/types.h> 40 41 typedef struct { 42 uint32_t src; 43 uint32_t dest; 44 uint16_t seq_no; 45 void *data; 46 size_t size; 47 } inetping_sdu_t; 40 #include <types/inetping.h> 48 41 49 42 typedef struct inetping_ev_ops { … … 53 46 extern int inetping_init(inetping_ev_ops_t *); 54 47 extern int inetping_send(inetping_sdu_t *); 55 extern int inetping_get_srcaddr( uint32_t, uint32_t *);48 extern int inetping_get_srcaddr(const inet_addr_t *, inet_addr_t *); 56 49 57 50 #endif -
uspace/lib/c/include/inet/iplink.h
r820104d rc2a6983 37 37 38 38 #include <async.h> 39 #include <sys/types.h>40 39 #include <inet/addr.h> 41 40 … … 78 77 79 78 typedef struct iplink_ev_ops { 80 int (*recv)(iplink_t *, iplink_recv_sdu_t *, uint16_t);79 int (*recv)(iplink_t *, iplink_recv_sdu_t *, ip_ver_t); 81 80 } iplink_ev_ops_t; 82 81 -
uspace/lib/c/include/inet/iplink_srv.h
r820104d rc2a6983 39 39 #include <fibril_synch.h> 40 40 #include <stdbool.h> 41 #include <sys/types.h>42 41 #include <inet/addr.h> 43 42 #include <inet/iplink.h> … … 67 66 68 67 extern int iplink_conn(ipc_callid_t, ipc_call_t *, void *); 69 extern int iplink_ev_recv(iplink_srv_t *, iplink_recv_sdu_t *, uint16_t);68 extern int iplink_ev_recv(iplink_srv_t *, iplink_recv_sdu_t *, ip_ver_t); 70 69 71 70 #endif -
uspace/lib/c/include/ipc/dev_iface.h
r820104d rc2a6983 36 36 typedef enum { 37 37 HW_RES_DEV_IFACE = 0, 38 PIO_WINDOW_DEV_IFACE, 39 38 40 /** Character device interface */ 39 41 CHAR_DEV_IFACE, … … 41 43 /** Graphic device interface */ 42 44 GRAPH_DEV_IFACE, 45 46 /** Audio device mixer interface */ 47 AUDIO_MIXER_IFACE, 48 /** Audio device pcm buffer interface */ 49 AUDIO_PCM_BUFFER_IFACE, 43 50 44 51 /** Network interface controller interface */ … … 54 61 /** Interface provided by USB HID devices. */ 55 62 USBHID_DEV_IFACE, 63 56 64 /** Interface provided by Real Time Clock devices */ 57 65 CLOCK_DEV_IFACE, 66 58 67 /** Interface provided by battery powered devices */ 59 68 BATTERY_DEV_IFACE, 69 60 70 /** Interface provided by AHCI devices. */ 61 71 AHCI_DEV_IFACE, -
uspace/lib/c/include/ipc/devman.h
r820104d rc2a6983 42 42 43 43 typedef sysarg_t devman_handle_t; 44 45 typedef enum { 46 /** Driver has not been started. */ 47 DRIVER_NOT_STARTED = 0, 48 49 /** 50 * Driver has been started, but has not registered as running and ready 51 * to receive requests. 52 */ 53 DRIVER_STARTING, 54 55 /** Driver is running and prepared to serve incomming requests. */ 56 DRIVER_RUNNING 57 } driver_state_t; 44 58 45 59 typedef enum { … … 155 169 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD, 156 170 DEVMAN_DEV_GET_FUNCTIONS, 171 DEVMAN_DEV_GET_PARENT, 157 172 DEVMAN_FUN_GET_CHILD, 173 DEVMAN_FUN_GET_MATCH_ID, 158 174 DEVMAN_FUN_GET_NAME, 159 175 DEVMAN_FUN_GET_DRIVER_NAME, … … 161 177 DEVMAN_FUN_OFFLINE, 162 178 DEVMAN_FUN_GET_PATH, 163 DEVMAN_FUN_SID_TO_HANDLE 179 DEVMAN_FUN_SID_TO_HANDLE, 180 DEVMAN_GET_DRIVERS, 181 DEVMAN_DRIVER_GET_DEVICES, 182 DEVMAN_DRIVER_GET_HANDLE, 183 DEVMAN_DRIVER_GET_MATCH_ID, 184 DEVMAN_DRIVER_GET_NAME, 185 DEVMAN_DRIVER_GET_STATE, 186 DEVMAN_DRIVER_LOAD 164 187 } client_to_devman_t; 165 188 -
uspace/lib/c/include/ipc/inet.h
r820104d rc2a6983 72 72 INETCFG_GET_LINK_LIST, 73 73 INETCFG_GET_SROUTE_LIST, 74 INETCFG_LINK_ADD, 74 75 INETCFG_LINK_GET, 76 INETCFG_LINK_REMOVE, 75 77 INETCFG_SROUTE_CREATE, 76 78 INETCFG_SROUTE_DELETE, … … 90 92 } inetping_request_t; 91 93 92 /** Events on Inet ping6 port */93 typedef enum {94 INETPING6_EV_RECV = IPC_FIRST_USER_METHOD95 } inetping6_event_t;96 97 /** Requests on Inet ping6 port */98 typedef enum {99 INETPING6_SEND = IPC_FIRST_USER_METHOD,100 INETPING6_GET_SRCADDR101 } inetping6_request_t;102 103 94 #endif 104 95 -
uspace/lib/c/include/ipc/services.h
r820104d rc2a6983 53 53 } services_t; 54 54 55 #define SERVICE_NAME_CORECFG "corecfg" 56 #define SERVICE_NAME_DHCP "net/dhcp" 55 57 #define SERVICE_NAME_DNSR "net/dnsr" 56 58 #define SERVICE_NAME_INET "net/inet" … … 58 60 #define SERVICE_NAME_INETPING "net/inetping" 59 61 #define SERVICE_NAME_INETPING6 "net/inetping6" 62 #define SERVICE_NAME_NETCONF "net/netconf" 60 63 61 64 #endif -
uspace/lib/c/include/ipc/socket.h
r820104d rc2a6983 198 198 #define SOCKET_GET_OPT_NAME(call) \ 199 199 ({ \ 200 int opt_name = (int) IPC_GET_ARG 4(call); \200 int opt_name = (int) IPC_GET_ARG2(call); \ 201 201 opt_name; \ 202 202 }) -
uspace/lib/c/include/ipc/vfs.h
r820104d rc2a6983 82 82 VFS_IN_WAIT_HANDLE, 83 83 VFS_IN_MTAB_GET, 84 VFS_IN_STATFS 84 85 } vfs_in_request_t; 85 86 … … 98 99 VFS_OUT_LOOKUP, 99 100 VFS_OUT_DESTROY, 101 VFS_OUT_STATFS, 100 102 VFS_OUT_LAST 101 103 } vfs_out_request_t; -
uspace/lib/c/include/macros.h
r820104d rc2a6983 40 40 #define abs(a) ((a) >= 0 ? (a) : -(a)) 41 41 42 #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) 42 43 43 44 #define KiB2SIZE(kb) ((kb) << 10) -
uspace/lib/c/include/net/socket.h
r820104d rc2a6983 57 57 extern int connect(int, const struct sockaddr *, socklen_t); 58 58 extern int closesocket(int); 59 extern int send(int, void *, size_t, int);59 extern int send(int, const void *, size_t, int); 60 60 extern int sendto(int, const void *, size_t, int, const struct sockaddr *, 61 61 socklen_t); -
uspace/lib/c/include/net/socket_codes.h
r820104d rc2a6983 75 75 typedef int32_t socklen_t; 76 76 77 /* Socket options */ 78 79 enum { 80 SOL_SOCKET = 1, 81 82 /* IP link to transmit on */ 83 SO_IPLINK 84 }; 85 77 86 #endif 78 87 -
uspace/lib/c/include/stdio.h
r820104d rc2a6983 124 124 extern int vsnprintf(char *, size_t, const char *, va_list); 125 125 126 extern int printf_size(const char *, ...) 127 PRINTF_ATTRIBUTE(1, 2); 128 extern int vprintf_size(const char *, va_list); 129 126 130 /* File stream functions */ 127 131 extern FILE *fopen(const char *, const char *); -
uspace/lib/c/include/types/inet.h
r820104d rc2a6983 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2012 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 30 30 * @{ 31 31 */ 32 33 32 /** @file 34 * Network device.35 33 */ 36 34 37 #ifndef LIBC_ NET_DEVICE_H_38 #define LIBC_ NET_DEVICE_H_35 #ifndef LIBC_TYPES_INET_H_ 36 #define LIBC_TYPES_INET_H_ 39 37 40 #include <adt/int_map.h> 41 #include <nic/nic.h> 38 #include <inet/addr.h> 39 #include <ipc/loc.h> 40 #include <sys/types.h> 42 41 43 /** Device identifier to generic type map declaration. */ 44 #define DEVICE_MAP_DECLARE INT_MAP_DECLARE 42 #define INET_TTL_MAX 255 45 43 46 /** Device identifier to generic type map implementation. */ 47 #define DEVICE_MAP_IMPLEMENT INT_MAP_IMPLEMENT 44 typedef struct { 45 /** Local IP link service ID (optional) */ 46 service_id_t iplink; 47 inet_addr_t src; 48 inet_addr_t dest; 49 uint8_t tos; 50 void *data; 51 size_t size; 52 } inet_dgram_t; 48 53 49 /** Device identifier type. */ 50 typedef int nic_device_id_t; 54 typedef struct { 55 int (*recv)(inet_dgram_t *); 56 } inet_ev_ops_t; 51 57 52 /** Invalid device identifier. */ 53 #define NIC_DEVICE_INVALID_ID (-1) 58 typedef enum { 59 INET_DF = 1 60 } inet_df_t; 54 61 55 62 #endif -
uspace/lib/c/include/types/inetping.h
r820104d rc2a6983 1 1 /* 2 * Copyright (c) 2013 Martin Decky2 * Copyright (c) 2013 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 30 30 * @{ 31 31 */ 32 /** @file 32 /** 33 * @file 34 * @brief 33 35 */ 34 36 35 #ifndef LIBC_ INET_INETPING6_H_36 #define LIBC_ INET_INETPING6_H_37 #ifndef LIBC_TYPES_INETPING_H_ 38 #define LIBC_TYPES_INETPING_H_ 37 39 38 #include <inet/ inet.h>40 #include <inet/addr.h> 39 41 #include <sys/types.h> 40 42 41 43 typedef struct { 42 addr128_t src;43 addr128_t dest;44 inet_addr_t src; 45 inet_addr_t dest; 44 46 uint16_t seq_no; 45 47 void *data; 46 48 size_t size; 47 } inetping6_sdu_t; 48 49 typedef struct inetping6_ev_ops { 50 int (*recv)(inetping6_sdu_t *); 51 } inetping6_ev_ops_t; 52 53 extern int inetping6_init(inetping6_ev_ops_t *); 54 extern int inetping6_send(inetping6_sdu_t *); 55 extern int inetping6_get_srcaddr(addr128_t, addr128_t); 49 } inetping_sdu_t; 56 50 57 51 #endif -
uspace/lib/c/include/vfs/vfs.h
r820104d rc2a6983 44 44 #include "vfs_mtab.h" 45 45 46 46 47 enum vfs_change_state_type { 47 48 VFS_PASS_HANDLE 48 49 }; 50 49 51 50 52 extern char *absolutize(const char *, size_t *); … … 61 63 extern async_exch_t *vfs_exchange_begin(void); 62 64 extern void vfs_exchange_end(async_exch_t *); 63 64 65 #endif 65 66
Note:
See TracChangeset
for help on using the changeset viewer.
