Code example
#include <libst.h>
main(int argc, char **argv){
st_interface_t iface;
st_connector_t conn;
st_bufxrange_t bx;
st_mx_t mx;
st_macaddr_t ula;
st_header_t hdr;
...
iface = st_open("gsn0");
port = ST_ANY_PORT;
conn = st_connector_alloc(iface, &port);
buf = memalign(PAGE_SIZE, bufsize);
bx = st_bufxrange_alloc(iface, num);
st_bufxrange_map(bx, ST_BUFX_MAP_RX, buf, len, 0);
mx = st_mx_alloc(iface, conn, bx);
Previous slide
Next slide
Back to first slide
View graphic version