summaryrefslogtreecommitdiff
path: root/libmachdev/mach_glue.h
blob: 7b1225833c71a6ff187ab4239995ea4f4a6cc0ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef __MACH_GLUE_H__
#define __MACH_GLUE_H__

/* network */
#include <arpa/inet.h>

#include <ddekit/thread.h>

struct sk_buff;
struct net_device;
void skb_done_queue(struct sk_buff *skb);
struct sk_buff *skb_done_dequeue();
void *skb_reply(struct sk_buff *skb);

int netdev_flags(struct net_device *dev);
char *netdev_addr(struct net_device *dev);
char *netdev_name (struct net_device *dev);
unsigned int netdev_mtu (struct net_device *dev);
unsigned short netdev_header_len (struct net_device *dev);
unsigned short netdev_type (struct net_device *dev);
unsigned char netdev_addr_len (struct net_device *dev);

int dev_change_flags (struct net_device *dev, short flags);
int linux_pkg_xmit (char *pkg_data, int len, void *del_data,
		    int (*del_func) (struct sk_buff *, void *),
		    struct net_device *dev);
struct net_device *search_netdev (char *name);
void kfree_skb (struct sk_buff *skb);
int dev_open(struct net_device *dev);
void *l4dde26_register_rx_callback(void *cb);
void skb_done_head_init();

/* block device */
struct block_device;
struct block_device *open_block_dev (char *name, int part, dev_mode_t mode);
int block_dev_rw (struct block_device *dev, int sectornr,
		  char *data, int count, int rw, void (*write_done) (int err));

int l4dde26_process_from_ddekit(ddekit_thread_t *t);

#endif