00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _LOCAL_H_
00009 #define _LOCAL_H_
00010
00011 #include <l4/ore/ore.h>
00012 #include <l4/log/l4log.h>
00013 #include <l4/sys/types.h>
00014 #include <l4/util/util.h>
00015 #include <l4/util/l4_macros.h>
00016 #include <l4/env/errno.h>
00017 #include <l4/ore/ore-dsi.h>
00018 #include <l4/dm_mem/dm_mem.h>
00019 #include <stdlib.h>
00020 #include "ore_rxtx-client.h"
00021 #include "ore_manager-client.h"
00022
00023
00024 #define CONN_MAX 8
00025
00026 typedef struct ore_client_conn_desc{
00027 l4ore_handle_t remote_manager_thread;
00028 l4ore_handle_t remote_worker_thread;
00029 dsi_socket_t *local_send_socket;
00030 dsi_socket_t *local_recv_socket;
00031 void *send_addr;
00032 void *recv_addr;
00033 int (*send_func)(l4ore_handle_t, int, char *, l4_size_t);
00034 int (*rx_func_blocking)(l4ore_handle_t, int, char **, l4_size_t *, l4_timeout_t);
00035 int (*rx_func_nonblocking)(l4ore_handle_t, int, char **, l4_size_t *);
00036 } ore_client_conn_desc;
00037
00038 extern ore_client_conn_desc descriptor_table[CONN_MAX];
00039 extern int ore_initialized;
00040
00041 int ore_lookup_server(char *orename, l4ore_handle_t *manager);
00042 l4ore_handle_t ore_do_open(int handle, const char *dev,
00043 unsigned char mac[6], l4ore_config *flags);
00044
00045
00046 int ore_send_string(l4ore_handle_t channel, int handle, char *data, l4_size_t size);
00047 int ore_recv_string_blocking(l4ore_handle_t channel, int handle, char **data, l4_size_t *size, l4_timeout_t);
00048 int ore_recv_string_nonblocking(l4ore_handle_t channel, int handle, char **data, l4_size_t *size);
00049
00050
00051 int ore_send_dsi(l4ore_handle_t channel, int handle, char *data, l4_size_t size);
00052 int ore_recv_dsi_blocking(l4ore_handle_t channel, int handle, char **data, l4_size_t *size, l4_timeout_t);
00053 int ore_recv_dsi_nonblocking(l4ore_handle_t channel, int handle, char **data, l4_size_t *size);
00054
00055 int __l4ore_init_send_socket(l4ore_handle_t, l4ore_config *conf, dsi_socket_t **, void **);
00056 int __l4ore_init_recv_socket(l4ore_handle_t, l4ore_config *conf, dsi_socket_t **, void **);
00057 void __l4ore_remember_packet(dsi_socket_t *, dsi_packet_t *, void *, l4_size_t);
00058
00059 void ore_do_close(int handle);
00060
00061 #endif //_LOCAL_H_