⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 net.h

📁 This a framework to test new ideas in transmission technology. Actual development is a LDPC-coder in
💻 H
字号:
#ifndef NET_H__#define NET_H__#include "tcpip.h"#include "buf.h"#ifndef USER_SPACE/* * This structure is private to each device. It is used to pass * packets in and out, so there is place for a packet */#define NET_RX_INTR 1#define NET_TX_INTR 2struct net_priv {  struct net_device_stats stats;  int status;  int rx_packetlen;  u8 *rx_packetdata;  int tx_packetlen;  u8 *tx_packetdata;  struct sk_buff *skb;  spinlock_t lock;  struct buffer_t *buf;};#elsestruct net_priv {  int status;  int rx_packetlen;  u8 *rx_packetdata;  int tx_packetlen;  u8 *tx_packetdata;  struct buffer_t *buf;};struct sk_buff {  int v;};struct net_device {  void *priv;};#endif/* * Generate a packet */int net_tx( struct buffer_t *buf );/** * @short sends a packet to the kernel * * Takes a packet, makes a nice envelope and sends it to * the kernel. * * @param block the packet * @param len the length in bytes */void net_send_to_kernel(struct net_device *dev, char *buf, int len);/** * The initialisation function called by an insmod tcpip */int net_init( void );/** * The cleanup function called when rmmod tcpip */void net_cleanup( void );#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -