I have found in sources BABEL where is used channels where is possible to change for use hamradio frequnecy:
interface.c
===============
check_interface_channel(struct interface *ifp)
{
int channel = IF_CONF(ifp, channel);
if(channel == IF_CHANNEL_UNKNOWN) {
if((ifp->flags & IF_WIRED)) {
channel = IF_CHANNEL_NONINTERFERING;
} else {
channel = kernel_interface_channel(ifp->name, ifp->ifindex);
if(channel < 0)
fprintf(stderr,
"Couldn't
determine channel of interface %s: %s.\n",
ifp->name, strerror(errno));
if(channel <= 0)
channel = IF_CHANNEL_INTERFERING;
}
}
if(ifp->channel != channel) {
ifp->channel = channel;
return 1;
}
return 0;
}
----------------------------------------------------
configuration.c
================
if(strcmp(t,
"noninterfering") == 0)
if_conf->channel = IF_CHANNEL_NONINTERFERING;
else if(strcmp(t, "interfering") == 0)
if_conf->channel = IF_CHANNEL_INTERFERING;
else
{
if_conf->channel = strtol(t, &end, 0);
if(*end != '\0')
goto error;
}
free(t);
if((if_conf->channel < 1 || if_conf->channel > 255) &&
if_conf->channel != IF_CHANNEL_NONINTERFERING)
goto error;
-------------------------------------------------------------------
kernel_netlink.c
================
static int
freq_to_chan(struct iw_freq *freq)
{
int m = freq->m, e = freq->e;
/* If exponent is 0, assume the channel is encoded directly in m. */
if(e == 0 && m > 0 && m < 254)
return m;
if(e <= 6) {
int mega, step, c, i;
/* This encodes 1 MHz */
mega = 1000000;
for(i = 0; i < e; i++)
mega /= 10;
/* Channels 1 through 13 are 5 MHz
apart, with channel 1 at 2412. */
step = 5 * mega;
c = 1 + (m - 2412 * mega + step / 2) / step;
if(c >= 1 && c <= 13)
return c;
/* Channel 14 is at 2484 MHz */
if(c >= 14 && m < 2484 * mega + step / 2)
return 14;
/* 802.11a channel 36 is at 5180 MHz */
c = 36 + (m - 5180 * mega + step / 2) / step;
if(c >= 34 && c <= 165)
return c;
}
--------------------------------------------------------------------------
_______________________________________________ Babel-users mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

