char *mac_address() {
int s;
struct ifreq ifr;
s = socket(PF_INET, SOCK_DGRAM, 0);
memset(&ifr, 0x00, sizeof(ifr));
strcpy(ifr.ifr_name, "eth0");
ioctl(s, SIOCGIFHWADDR, &ifr);
close(s);
static char mac_address[12];
sprintf(mac_address, "%.2X%.2X%.2X%.2X%.2X%.2X",
(unsigned char) ifr.ifr_hwaddr.sa_data[0],
(unsigned char) ifr.ifr_hwaddr.sa_data[1],
(unsigned char) ifr.ifr_hwaddr.sa_data[2],
(unsigned char) ifr.ifr_hwaddr.sa_data[3],
(unsigned char) ifr.ifr_hwaddr.sa_data[4],
(unsigned char) ifr.ifr_hwaddr.sa_data[5]);
return mac_address;
}
int main(int argc, char *argv[]) {
if (argc == 1) {
return 0;
}
if (strcmp(argv[1], "--mac") == 0) {
printf("%s", mac_address());
return 0;
}
const char *configfile = "/etc/modbuslog.cfg";
config_t cfg;
const char *ftp_server;
const char *ftp_username;
const char *ftp_password;
const char *ftp_directory;
config_init(&cfg);
if (!config_read_file(&cfg, configfile)) {
fprintf(stderr, "%s:%d - %s\n", config_error_file(&cfg),
config_error_line(&cfg), config_error_text(&cfg));
config_destroy(&cfg);
fprintf(stderr, "Unable to find configfile.\n");
return 1;
}
if (!(config_lookup_string(&cfg, "ftp.server", &ftp_server)
&& config_lookup_string(&cfg, "ftp.username", &ftp_username)
&& config_lookup_string(&cfg, "ftp.password", &ftp_password)
&& config_lookup_string(&cfg, "ftp.directory", &ftp_directory))) {
fprintf(stderr,
"Incomplete ftp configuration. Check configuration file.\n");
return 1;
}
if (strcmp(argv[1], "--server") == 0) {
printf("%s", ftp_server);
return 0;
}
if (strcmp(argv[1], "--username") == 0) {
printf("%s", ftp_username);
return 0;
}
if (strcmp(argv[1], "--password") == 0) {
printf("%s", ftp_password);
return 0;
}
if (strcmp(argv[1], "--directory") == 0) {
printf("%s", ftp_directory);
return 0;
}
}
c8d57935bb1a9b334026038ed&follow=1'>isdb-t: Update Brazil channel lists| Mauro Carvalho Chehab | 1935 | -11312/+70605 |
|
Use the current lists from portalbsd.com.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Those transponders may have been renamed or decommissioned. So,
drop them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
updates all transmitter files, removes discontinued muxes
Link: https://lore.kernel.org/linux-media/20230216010528.5921-1-simon@liddicott.com
Signed-off-by: Simon Liddicott <simon@liddicott.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Modifications by: https://digi.hu/tv/csatornalista
FREQUENCY = 121000000
Link: https://lore.kernel.org/linux-media/8c632dad-d428-402e-a171-baf7234f2d85@gmail.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
There were some changes at Portugal channel frequencies, mostly
in 2020. Update the DVB-T channel list accordingly, in order to
reflect the current list of emitters.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
only includes transmitters where there have been changes
Link: https://lore.kernel.org/linux-media/20210128234622.75009-1-simon@liddicott.com
Signed-off-by: Simon Liddicott <simon@liddicott.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Data updated according with https://portalbsd.com.br/.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There are several entries that used to be at Lyngsat.
Several of them were merged with other entries.
On others, there's no TV signal anymore.
So, drop them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Those are are new satellite descriptions that didn't use to
exist on Lyngsat. Add them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Those two satellites have two names. Use Just one of them.
While here, update their frequencies from Lyngsat.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|