Can now both send and receive packets. LL header format not yet

fixed; still using a quick hack-up just to be able to pass through
data.
This commit is contained in:
Michael Brown
2007-09-13 14:43:12 +01:00
parent 03c90e183f
commit 30a19c3f1c
4 changed files with 60 additions and 7 deletions

View File

@@ -70,6 +70,17 @@ static int ib_tx ( struct io_buffer *iobuf, struct net_device *netdev,
* network-layer protocol.
*/
static int ib_rx ( struct io_buffer *iobuf, struct net_device *netdev ) {
struct {
uint16_t proto;
uint16_t reserved;
} * header = iobuf->data;
iob_pull ( iobuf, sizeof ( *header ) );
return net_rx ( iobuf, netdev, header->proto, NULL );
struct ibhdr *ibhdr = iobuf->data;
/* Sanity check */