Fix some typo in BUILD note.
Update headers to reflect the net_data* -> net_buffer* move git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3326 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
Jampfiles should replace these BeIDE projects files in the future.
|
||||
But, beware:
|
||||
- the net_server binary should symlinked as _APP_ in each sub-drectories, so that
|
||||
each module can find the kernel module API exported in this app.
|
||||
- the net_server binary should be symlinked as _APP_ in each sub-drectories, so
|
||||
each module can be linked against it to find the kernel module API exported in this app.
|
||||
- the net_server will try to load the modules from a local add-ons folder, which should
|
||||
be build by hand today: symlink each module like this:
|
||||
be build by hand today: please symlink each module like this:
|
||||
|
||||
net_server
|
||||
add-ons\
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct net_data;
|
||||
struct net_buffer;
|
||||
|
||||
typedef struct if_data {
|
||||
/* generic interface information */
|
||||
@@ -101,8 +101,8 @@ struct net_interface_module_info {
|
||||
status_t (*up)(ifnet_t *ifnet);
|
||||
status_t (*down)(ifnet_t *ifnet);
|
||||
|
||||
status_t (*send_data)(ifnet_t *ifnet, struct net_data *data);
|
||||
status_t (*receive_data)(ifnet_t *ifnet, struct net_data **data);
|
||||
status_t (*send_buffer)(ifnet_t *ifnet, struct net_buffer *buffer);
|
||||
status_t (*receive_buffer)(ifnet_t *ifnet, struct net_buffer **buffer);
|
||||
|
||||
status_t (*control)(ifnet_t *ifnet, int opcode, void *arg);
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Networking data chunk(s) definition
|
||||
typedef struct net_data net_data;
|
||||
typedef struct net_data_queue net_data_queue;
|
||||
typedef void (*data_node_free_func)(void * arg1, ...); // data node free callback prototype
|
||||
// Networking buffer(s) definition
|
||||
typedef struct net_buffer net_buffer;
|
||||
typedef struct net_buffer_queue net_buffer_queue;
|
||||
typedef void (*buffer_chunk_free_func)(void * arg1, ...); // buffer chunk free callback prototype
|
||||
|
||||
// Networking timers definitions
|
||||
typedef struct net_timer net_timer;
|
||||
@@ -53,33 +53,37 @@ struct net_stack_module_info {
|
||||
status_t (*unregister_interface)(ifnet_t *ifnet);
|
||||
|
||||
/*
|
||||
* Data chunk(s) support
|
||||
* Buffer(s) support
|
||||
*/
|
||||
|
||||
net_data * (*new_data)(void);
|
||||
status_t (*delete_data)(net_data *nd, bool interrupt_safe);
|
||||
net_buffer * (*new_buffer)(void);
|
||||
status_t (*delete_buffer)(net_buffer *buffer, bool interrupt_safe);
|
||||
|
||||
net_data * (*duplicate_data)(net_data *from);
|
||||
net_data * (*clone_data)(net_data *from);
|
||||
net_buffer * (*duplicate_buffer)(net_buffer *from);
|
||||
net_buffer * (*clone_buffer)(net_buffer *from);
|
||||
net_buffer * (*split_buffer)(net_buffer *from, uint32 offset);
|
||||
|
||||
status_t (*prepend_data)(net_data *nd, const void *data, uint32 bytes, data_node_free_func freethis);
|
||||
status_t (*append_data)(net_data *nd, const void *data, uint32 bytes, data_node_free_func freethis);
|
||||
status_t (*insert_data)(net_data *nd, uint32 offset, const void *data, uint32 bytes, data_node_free_func freethis);
|
||||
status_t (*remove_data)(net_data *nd, uint32 offset, uint32 bytes);
|
||||
|
||||
status_t (*add_data_free_node)(net_data *nd, void *arg1, void *arg2, data_node_free_func freethis);
|
||||
// specials offsets for add_to_buffer()
|
||||
#define BUFFER_BEGIN 0
|
||||
#define BUFFER_END 0xFFFFFFFF
|
||||
status_t (*add_to_buffer)(net_buffer *buffer, uint32 offset, const void *data, uint32 bytes, buffer_chunk_free_func freethis);
|
||||
status_t (*remove_from_buffer)(net_buffer *buffer, uint32 offset, uint32 bytes);
|
||||
|
||||
uint32 (*copy_from_data)(net_data *nd, uint32 offset, void *copyinto, uint32 bytes);
|
||||
status_t (*attach_buffer_free_element)(net_buffer *buffer, void *arg1, void *arg2, buffer_chunk_free_func freethis);
|
||||
|
||||
void (*dump_data)(net_data *nd);
|
||||
uint32 (*read_buffer)(net_buffer *buffer, uint32 offset, void *data, uint32 bytes);
|
||||
uint32 (*write_buffer)(net_buffer *buffer, uint32 offset, const void *data, uint32 bytes);
|
||||
|
||||
// Data queues support
|
||||
net_data_queue * (*new_data_queue)(size_t max_bytes);
|
||||
status_t (*delete_data_queue)(net_data_queue *queue);
|
||||
void (*dump_buffer)(net_buffer *buffer);
|
||||
|
||||
status_t (*empty_data_queue)(net_data_queue *queue);
|
||||
status_t (*enqueue_data)(net_data_queue *queue, net_data *data);
|
||||
size_t (*dequeue_data)(net_data_queue *queue, net_data **data, bigtime_t timeout, bool peek);
|
||||
// Buffer queues support
|
||||
net_buffer_queue * (*new_buffer_queue)(size_t max_bytes);
|
||||
status_t (*delete_buffer_queue)(net_buffer_queue *queue);
|
||||
|
||||
status_t (*empty_buffer_queue)(net_buffer_queue *queue);
|
||||
status_t (*enqueue_buffer)(net_buffer_queue *queue, net_buffer *buffer);
|
||||
size_t (*dequeue_buffer)(net_buffer_queue *queue, net_buffer **buffer, bigtime_t timeout, bool peek);
|
||||
|
||||
// Timers support
|
||||
|
||||
@@ -87,7 +91,7 @@ struct net_stack_module_info {
|
||||
status_t (*delete_timer)(net_timer *timer);
|
||||
status_t (*start_timer)(net_timer *timer, net_timer_func func, void *cookie, bigtime_t period);
|
||||
status_t (*cancel_timer)(net_timer *timer);
|
||||
status_t (*get_timer_appointment)(net_timer *timer, bigtime_t *period, bigtime_t *when);
|
||||
status_t (*timer_appointment)(net_timer *timer, bigtime_t *period, bigtime_t *when);
|
||||
|
||||
// Lockers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user