2 This file is part of Wi-viz (http://wiviz.natetrue.com).
4 Wi-viz is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License v2 as published by
6 the Free Software Foundation.
8 Wi-viz is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with Wi-viz; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "wl_access.h"
22 #include "channelhopper.h"
25 void ch_sig_handler(int i
) {
29 void channelHopper(wiviz_cfg
* cfg
) {
33 //Turn off signal handling from parent process
34 signal(SIGUSR1
, &ch_sig_handler
);
35 signal(SIGUSR2
, &ch_sig_handler
);
40 nc
= cfg
->channelHopSeq
[hopPos
];
41 hopPos
= (hopPos
+ 1) % cfg
->channelHopSeqLen
;
43 fprintf(stderr
, "It sets the channel to %i\n", nc
);
44 wl_ioctl(WL_DEVICE
, WLC_SET_CHANNEL
, &nc
, 4);
46 usleep(cfg
->channelDwellTime
* 1000);
This page took 0.042502 seconds and 5 git commands to generate.