void netScan(char* ssid) { nscan=0; VPUSH(PNTTOVAL(VMALLOCSTR("foo",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-20)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("foo",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-10)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("zzzz",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-10)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-10)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("a\"a<a'a a\\a",strlen("a\"a<a'a a\\a")))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-10)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(3)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("foo",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-30)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(NIL); while(nscan--) VMKTAB(2); }
void netScan_(struct rt2501_scan_result *scan_result, void *userparam) { char buf[256]; sprintf(buf,">>> %s %d %d %d %d\n",scan_result->ssid,scan_result->rssi,scan_result->channel,scan_result->rateset,scan_result->encryption); consolestr((UBYTE*)buf); VPUSH(PNTTOVAL(VMALLOCSTR(scan_result->ssid,strlen(scan_result->ssid)))); VPUSH(PNTTOVAL(VMALLOCSTR((char*)scan_result->mac,6))); VPUSH(PNTTOVAL(VMALLOCSTR((char*)scan_result->bssid,6))); VPUSH(INTTOVAL(scan_result->rssi)); VPUSH(INTTOVAL(scan_result->channel)); VPUSH(INTTOVAL(scan_result->rateset)); VPUSH(INTTOVAL(scan_result->encryption)); VMKTAB(7); nscan++; }
char *loaderInitRec(char *src) { int l,i; l=loaderGetInt(src); src+=4; if (l==-1) { // printf("nil\n",l>>1); VPUSH(NIL); } else if (l&1) { l>>=1; if (l&1) { l>>=1; // printf("tuple %d\n",l); for(i=0;i<l;i++) src=loaderInitRec(src); VMKTAB(l); }
void sysRfidgetList() { #ifdef VSIMU VPUSH(NIL); #endif #ifdef VREAL int n=0; n=check_rfid_n(); if (n<=0) { VPUSH(NIL); return; } int i; for(i=0;i<n;i++) { VPUSH(PNTTOVAL(VMALLOCSTR(get_nth_rfid(i),8))); } VPUSH(NIL); while(n--) VMKTAB(2); #endif }
void netScan(char* ssid) { nscan=0; #ifdef VSIMU VPUSH(PNTTOVAL(VMALLOCSTR("foo",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-20)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("foo",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-10)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("zzzz",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-10)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-10)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("a\"a<a'a a\\a",strlen("a\"a<a'a a\\a")))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-10)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(3)); VMKTAB(7); nscan++; VPUSH(PNTTOVAL(VMALLOCSTR("foo",3))); VPUSH(PNTTOVAL(VMALLOCSTR("xyzxyz",6))); VPUSH(PNTTOVAL(VMALLOCSTR("765432",6))); VPUSH(INTTOVAL(-30)); VPUSH(INTTOVAL(11)); VPUSH(INTTOVAL(1)); VPUSH(INTTOVAL(0)); VMKTAB(7); nscan++; #endif #ifdef VREAL rt2501_scan(ssid, netScan_, NULL); #endif VPUSH(NIL); while(nscan--) VMKTAB(2); }