// // $Id: ipfw-al.c,v 1.2 2001/10/12 09:29:02 mavetju Exp $ // // // Just execute the "ipfw l" or "ipfw -a l" command. // #include #include #define LEN 1024 void usage(char *argv0) { fprintf(stderr,"Syntax: %s [defs]\n",argv0); exit(1); } int main(int argc, char **argv) { char s[LEN]; s[0]=0; if (argc==2) if (strcmp(argv[1],"defs")==0) { strcpy(s,"/sbin/ipfw l"); system(s); return 0; } if (argc!=1) usage(argv[0]); strcpy(s,"/sbin/ipfw -a l"); system(s); return 0; }