/* aperecv.c */ /* Send a file to a particular lc */ #include #include #include "atmdd.h" char buf[RB_SIZE]; main( int argc, char **argv) { int out; int fd; int len; int lc; int vci; fd = open("/dev/ape25", O_RDWR); vci = 9; if (argc > 1) sscanf(argv[1], "%d", &vci); lc = ape_createlc(fd, vci); printf("Listening on vci %d lc %d \n", vci, lc); memset(buf, 0, sizeof(buf)); printf("Address of buffer is %x \n", buf); while (len = ape_recv(fd, vci, buf, RB_SIZE)) { write(1, buf, len); } }