Hello,
I'm just starting to dig around in the source code of Merlin.
I'm trying to get my head around the FB wificode and how it handles the communication with facebook.
I started by looking at the router/rc/lan.c where FB is handled:
#ifdef RTCONFIG_FBWIFI
void stop_fbwifi_check()
{
killall("fb_wifi_check", SIGTERM);
}
void start_fbwifi_check()
{
char *fbwifi_argv[] = {"fb_wifi_check",NULL};
pid_t pid;
_eval(fbwifi_argv, NULL, 0, &pid);
}
void restart_fbwifi_register()
{
char *fbwifi_argv[] = {"fb_wifi_register",nvram_get("wl_unit"),nvram_get("wl_subunit"),NULL};
pid_t pid;
_eval(fbwifi_argv, NULL, 0, &pid);
}
#endif
The first hurdle that I found was that I could not find anywhere the definition of fb_wifi_check or fb_wifi_register.
I found in router/Makefile following section:
#fbwifi
fb_wifi/stamp-h1:
touch $@
fb_wifi: curl fb_wifi/stamp-h1
@$(MAKE) -C fb_wifi
fb_wifi-install: fb_wifi
@$(SEP)
install -D fb_wifi/fb_wifi_check $(INSTALLDIR)/fb_wifi/usr/sbin/fb_wifi_check
install -D fb_wifi/fb_wifi_register $(INSTALLDIR)/fb_wifi/usr/sbin/fb_wifi_register
install -D fb_wifi/libfbwifi.so $(INSTALLDIR)/fb_wifi/usr/lib/libfbwifi.so
$(STRIP) $(INSTALLDIR)/fb_wifi/usr/sbin/fb_wifi_check
$(STRIP) $(INSTALLDIR)/fb_wifi/usr/sbin/fb_wifi_register
$(STRIP) $(INSTALLDIR)/fb_wifi/usr/lib/libfbwifi.so
fb_wifi-clean:
-@$(MAKE) -C fb_wifi clean
rm -rf fb_wifi/stamp-h1
I somehow have the feeling that these are proprietary utils maybe from facebook. I searched through the git repository but to no avail ... I can not find any definition of these utils
Who can help ?
Peter
I'm just starting to dig around in the source code of Merlin.
I'm trying to get my head around the FB wificode and how it handles the communication with facebook.
I started by looking at the router/rc/lan.c where FB is handled:
#ifdef RTCONFIG_FBWIFI
void stop_fbwifi_check()
{
killall("fb_wifi_check", SIGTERM);
}
void start_fbwifi_check()
{
char *fbwifi_argv[] = {"fb_wifi_check",NULL};
pid_t pid;
_eval(fbwifi_argv, NULL, 0, &pid);
}
void restart_fbwifi_register()
{
char *fbwifi_argv[] = {"fb_wifi_register",nvram_get("wl_unit"),nvram_get("wl_subunit"),NULL};
pid_t pid;
_eval(fbwifi_argv, NULL, 0, &pid);
}
#endif
The first hurdle that I found was that I could not find anywhere the definition of fb_wifi_check or fb_wifi_register.
I found in router/Makefile following section:
#fbwifi
fb_wifi/stamp-h1:
touch $@
fb_wifi: curl fb_wifi/stamp-h1
@$(MAKE) -C fb_wifi
fb_wifi-install: fb_wifi
@$(SEP)
install -D fb_wifi/fb_wifi_check $(INSTALLDIR)/fb_wifi/usr/sbin/fb_wifi_check
install -D fb_wifi/fb_wifi_register $(INSTALLDIR)/fb_wifi/usr/sbin/fb_wifi_register
install -D fb_wifi/libfbwifi.so $(INSTALLDIR)/fb_wifi/usr/lib/libfbwifi.so
$(STRIP) $(INSTALLDIR)/fb_wifi/usr/sbin/fb_wifi_check
$(STRIP) $(INSTALLDIR)/fb_wifi/usr/sbin/fb_wifi_register
$(STRIP) $(INSTALLDIR)/fb_wifi/usr/lib/libfbwifi.so
fb_wifi-clean:
-@$(MAKE) -C fb_wifi clean
rm -rf fb_wifi/stamp-h1
I somehow have the feeling that these are proprietary utils maybe from facebook. I searched through the git repository but to no avail ... I can not find any definition of these utils
Who can help ?
Peter