/* apelccfg.c */ /* Generate traffic on a particular lc */ #include #include #include #include struct timezone dummy = {0,0}; char buf[1024]; main( int argc, char **argv) { int fd; int clm; int vci; int psr; fd = open("/dev/ape25", O_RDWR); ape_tmqcfg(fd, 7, 26 * 1024 * 1024, 1, 1); if (argc < 2) { printf("This sends configures xmit parms of vci specified \n"); printf("You must give vci number in decimal as parm 1. \n"); printf("You must give psr in decimal as parm 2. \n"); printf("You may give credit lim in decimal as parm 3. \n"); exit(1); } psr = 1; clm = 1; sscanf(argv[1], "%d", &vci); if (argc > 2) sscanf(argv[2], "%d", &psr); if (argc > 3) sscanf(argv[3], "%d", &clm); ape_lccfg(fd, vci, psr, clm); }