[an error occurred while processing this directive]

Tulip Library

The Tulip library provides access to the U4600's PCI network card. The tulip library is used directly by liblwip (the IP stack), you shouldn't need to use any of these functions directly. Most of these function are used lib/lwip/sos/sosif.c if you are interested.

tulip_init

struct tulip * tulip_init(bs_seq spaces, dma_handle_t dma, bus_space_t pciconf);

tulip_init initalises the state of the tulip driver and returns a handle to the driver.

tulip_get_macaddr

int tulip_get_macaddr(struct tulip *tulip, uint8_t macaddr[6]);

This will return the MAC address of the ethernet card.

tulip_interrupt_handler

int tulip_interrupt_handler(struct tulip *tulip);

This should be called whenever an interrupt occurs on the card.

tulip_enable_receive

int tulip_enable_receive(struct tulip *tulip);

This must be called before the card will recieve packets.

tulip_feedpacket

int tulip_feedpacket(struct tulip *tulip, uint32_t buffer_addr, size_t size, uint8_t first, uint8_t more, uint32_t key);

This sends a packet given packet.

tulip_freepacket

int tulip_freepacket(struct tulip *tulip, uint32_t buffer_addr, size_t size, uint32_t key);

This provides a buffer for the card to receive packets into.


Last modified: 27 Jul 2004. [an error occurred while processing this directive]