/* $Id: plugin_exec.c,v 1.9 2005/05/08 04:32:44 reinelt Exp $ * * plugin for external processes * * Copyright (C) 2004 Michael Reinelt * Copyright (C) 2004 The LCD4Linux Team * * based on the old 'exec' client which is * Copyright (C) 2001 Leopold Tötsch * * * This file is part of LCD4Linux. * * LCD4Linux is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * LCD4Linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * $Log: plugin_exec.c,v $ * Revision 1.9 2005/05/08 04:32:44 reinelt * CodingStyle added and applied * * Revision 1.8 2005/01/18 06:30:23 reinelt * added (C) to all copyright statements * * Revision 1.7 2004/09/24 21:41:00 reinelt * new driver for the BWCT USB LCD interface board. * * Revision 1.6 2004/06/26 12:05:00 reinelt * * uh-oh... the last CVS log message messed up things a lot... * * Revision 1.5 2004/06/26 09:27:21 reinelt * * added '-W' to CFLAGS * changed all C++ comments to C ones * cleaned up a lot of signed/unsigned mistakes * * Revision 1.4 2004/06/20 10:09:56 reinelt * * 'const'ified the whole source * * Revision 1.3 2004/06/17 06:23:43 reinelt * * hash handling rewritten to solve performance issues * * Revision 1.2 2004/04/08 10:48:25 reinelt * finished plugin_exec * modified thread handling * added '%x' format to qprintf (hexadecimal) * * Revision 1.1 2004/03/20 11:49:40 reinelt * forgot to add plugin_exec.c ... * */ /* * exported functions: * * int plugin_init_exec (void) * adds functions to start external pocesses * */ #include "config.h" #include #include #include #include #include #include "debug.h" #include "plugin.h" #include "hash.h" #include "cfg.h" #include "thread.h" #include "qprintf.h" #define NUM_THREADS 16 #define SHM_SIZE 4096 typedef struct { int delay; int mutex; pid_t pid; int shmid; char *cmd; char *key; char *ret; } EXEC_THREAD; static EXEC_THREAD Thread[NUM_THREADS]; static int max_thread = -1; static HASH EXEC; /* x^0 + x^5 + x^12 */ #define CRCPOLY 0x8408 static unsigned short CRC(const char *s) { int i; unsigned short crc; /* seed value */ crc = 0xffff; while (*s != '\0') { crc ^= *s++; for (i = 0; i < 8; i++) crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY : 0); } return crc; } static void exec_thread(void *data) { EXEC_THREAD *Thread = (EXEC_THREAD *) data; FILE *pipe; char buffer[SHM_SIZE]; int len; /* use a safe path */ putenv("PATH=/usr/local/bin:/usr/bin:/bin"); /* forever...
# Waiatarua, Auckland NZ
#
# Channel allocation details for NZ can be found at
# http://www.rsm.govt.nz/cms/policy-and-planning/current-projects/broadcasting/digital-television-2007-frequency-plan
#
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy

# Multiplex DA
T 538000000 8MHz 3/4 3/4 QAM64 8k 1/16 NONE
# Multiplex DB
T 570000000 8MHz 3/4 3/4 QAM64 8k 1/16 NONE
# Multiplex DC
T 666000000 8MHz 3/4 3/4 QAM64 8k 1/16 NONE