You can subscribe to this list here.
2002 |
Jan
|
Feb
(21) |
Mar
(57) |
Apr
(7) |
May
(1) |
Jun
(33) |
Jul
(5) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(3) |
---|
From: Todd L. <jt...@us...> - 2002-06-17 00:22:47
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv5046 Modified Files: version-test.c sleep.h sleep.c rtvguide.c guideclient.h guideclient.c filedarray.h filedarray.c dump-programset.h dump-programset.c dump-channelset.c channelset.h channelset.c addressbook.h addressbook.c Log Message: add copyright notes to files that were missing them Index: version-test.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/version-test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** version-test.c 16 Jun 2002 04:03:13 -0000 1.1 --- version-test.c 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include <stdio.h> #include "rtv.h" Index: sleep.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/sleep.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sleep.h 30 Mar 2002 00:26:53 -0000 1.1 --- sleep.h 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #ifndef SLEEP_H #define SLEEP_H Index: sleep.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/sleep.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sleep.c 11 Jun 2002 04:50:49 -0000 1.2 --- sleep.c 17 Jun 2002 00:22:41 -0000 1.3 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include "sleep.h" Index: rtvguide.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/rtvguide.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rtvguide.c 16 Jun 2002 04:01:55 -0000 1.3 --- rtvguide.c 17 Jun 2002 00:22:41 -0000 1.4 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include "rtv.h" #include "guideclient.h" Index: guideclient.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/guideclient.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** guideclient.h 25 Mar 2002 00:14:31 -0000 1.1 --- guideclient.h 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #ifndef GUIDECLIENT_H #define GUIDECLIENT_H Index: guideclient.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/guideclient.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** guideclient.c 25 Mar 2002 00:14:31 -0000 1.1 --- guideclient.c 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include "rtv.h" #include "guideclient.h" Index: filedarray.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/filedarray.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filedarray.h 25 Mar 2002 00:13:23 -0000 1.1 --- filedarray.h 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #ifndef FILEDARRAY_H #define FILEDARRAY_H Index: filedarray.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/filedarray.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filedarray.c 25 Mar 2002 00:13:23 -0000 1.1 --- filedarray.c 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include "rtv.h" #include "dump.h" Index: dump-programset.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/dump-programset.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dump-programset.h 11 Jun 2002 04:53:19 -0000 1.1 --- dump-programset.h 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include <stdio.h> #include "rtv.h" Index: dump-programset.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/dump-programset.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dump-programset.c 11 Jun 2002 04:53:19 -0000 1.1 --- dump-programset.c 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include <stdio.h> #include "rtv.h" Index: dump-channelset.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/dump-channelset.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dump-channelset.c 11 Jun 2002 04:53:19 -0000 1.1 --- dump-channelset.c 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include <stdio.h> #include "rtv.h" Index: channelset.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/channelset.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** channelset.h 11 Jun 2002 04:52:42 -0000 1.1 --- channelset.h 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #ifndef CHANNELSET_H #define CHANNELSET_H Index: channelset.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/channelset.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** channelset.c 11 Jun 2002 04:52:42 -0000 1.1 --- channelset.c 17 Jun 2002 00:22:41 -0000 1.2 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include <stdlib.h> #include <string.h> Index: addressbook.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/addressbook.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** addressbook.h 30 Mar 2002 00:23:43 -0000 1.2 --- addressbook.h 17 Jun 2002 00:22:41 -0000 1.3 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #ifndef ADDRESSBOOK_H #define ADDRESSBOOK_H Index: addressbook.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/addressbook.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** addressbook.c 30 Mar 2002 00:23:43 -0000 1.2 --- addressbook.c 17 Jun 2002 00:22:41 -0000 1.3 *************** *** 1,2 **** --- 1,16 ---- + /* + * Copyright (C) 2002 John Todd Larason <jt...@mo...> + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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. + */ + #include "rtv.h" #include "addressbook.h" |
From: Todd L. <jt...@us...> - 2002-06-16 07:51:46
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv27652 Modified Files: httpfsclient.c Log Message: clean up the encrypted vs. non-encrypted url building a little, including making the length checking accurate (rather than absurdly conservative) Index: httpfsclient.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/httpfsclient.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** httpfsclient.c 16 Jun 2002 04:02:51 -0000 1.9 --- httpfsclient.c 16 Jun 2002 07:51:42 -0000 1.10 *************** *** 23,26 **** --- 23,27 ---- #include <string.h> + #define ARGBUFSIZE 2048 static int make_httpfs_url(char * dst, size_t size, const char * address, const char * command, *************** *** 29,39 **** char * d, * tag, * value, *argp; int argno = 0; ! size_t l; ! char argbuf[2048]; /* XXX bad, should fix this */ (void) size; ! l = strlen(address) + strlen(command) + ! strlen("http:///httpfs-") + strlen("__Q_") + 32; if (l >= size) { fprintf(stderr, "Error: make_httpfs_url: address + command too long for buffer\n"); --- 30,39 ---- char * d, * tag, * value, *argp; int argno = 0; ! size_t l, argl; ! char argbuf[ARGBUFSIZE]; /* XXX bad, should fix this */ (void) size; ! l = strlen(address) + strlen(command) + strlen("http:///httpfs-?"); if (l >= size) { fprintf(stderr, "Error: make_httpfs_url: address + command too long for buffer\n"); *************** *** 42,48 **** d = dst; ! d += sprintf(d, "http://%s/httpfs-%s", address, command); argp = argbuf; while ((tag = va_arg(args, char *)) != NULL) { value = va_arg(args, char *); --- 42,49 ---- d = dst; ! d += sprintf(d, "http://%s/httpfs-%s?", address, command); argp = argbuf; + argl = 0; while ((tag = va_arg(args, char *)) != NULL) { value = va_arg(args, char *); *************** *** 50,60 **** continue; } ! // XXX for now, double up for the encrypted copy ! l += 2*(1+strlen(tag)+1+strlen(value)); ! if (l >= sizeof(argbuf)) { /* this isn't quite correct -- counts the whole url against the argbuf. good enough for now */ fprintf(stderr, "Error: make_httpfs_url: with arg %s, argbuf too small\n", tag); return -1; } ! argp += sprintf(argp, "%c%s=%s", argno == 0 ? '?' : '&', tag, value); argno++; } --- 51,64 ---- continue; } ! if (argno) ! argl++; ! argl += strlen(tag)+1+strlen(value); ! if (argl >= sizeof(argbuf)) { fprintf(stderr, "Error: make_httpfs_url: with arg %s, argbuf too small\n", tag); return -1; } ! if (argno) ! *argp++ = '&'; ! argp += sprintf(argp, "%s=%s", tag, value); argno++; } *************** *** 62,76 **** if (replaytv_version.major >= 5 || (replaytv_version.major == 4 && replaytv_version.minor >= 3)) { ! unsigned char ctext[2048+32] ; u32 ctextlen; unsigned int i; ! strcpy(d, "?__Q_="); ! l += strlen(d); d += strlen(d); ! rtv_encrypt(argbuf+1, strlen(argbuf)-1, ctext, sizeof ctext, ! &ctextlen, 1); for (i = 0; i < ctextlen; i++) d += sprintf(d, "%02x", ctext[i]); } else { strcpy(d, argbuf); } --- 66,88 ---- if (replaytv_version.major >= 5 || (replaytv_version.major == 4 && replaytv_version.minor >= 3)) { ! unsigned char ctext[ARGBUFSIZE+32] ; u32 ctextlen; unsigned int i; ! ! if (l + strlen("__Q_=") + 2*argl + 32 >= size) { ! fprintf(stderr, "Error: make_httpfs_url: encrypted args too large for buffer\n"); ! return -1; ! } ! ! strcpy(d, "__Q_="); d += strlen(d); ! rtv_encrypt(argbuf, argl, ctext, sizeof ctext, &ctextlen, 1); for (i = 0; i < ctextlen; i++) d += sprintf(d, "%02x", ctext[i]); } else { + if (l + argl >= size) { + fprintf(stderr, "Error: make_httpfs_url: args too large for buffer\n"); + return -1; + } strcpy(d, argbuf); } |
From: Todd L. <jt...@us...> - 2002-06-16 04:04:57
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv23218 Modified Files: .cvsignore Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/replaypc/replaypc/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 11 Jun 2002 04:54:58 -0000 1.5 --- .cvsignore 16 Jun 2002 04:04:55 -0000 1.6 *************** *** 13,16 **** --- 13,17 ---- dump-programset dump-replaychannels + dump-replayshows dump-zipcode2 find-GOPs *************** *** 34,37 **** --- 35,40 ---- out rddns + replaypc-0.4.0alpha2-i686-pc-linux-gnu rtvguide un-protect + version-test |
From: Todd L. <jt...@us...> - 2002-06-16 04:04:30
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv23130 Modified Files: Makefile Log Message: remove ENCRYPTED_QUERY -- now run-time controlled split PROGRAMS into two lists; EXTRA_PROGRAMS not included in bindist Index: Makefile =================================================================== RCS file: /cvsroot/replaypc/replaypc/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile 16 Jun 2002 00:58:03 -0000 1.13 --- Makefile 16 Jun 2002 04:04:27 -0000 1.14 *************** *** 14,18 **** LARGEFILE_SUPPORT=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PLATFORM_SUPPORT=-D__unix__ - ENCRYPTED_QUERY=-DENC PLATFORM=$(shell /usr/libexec/config.guess) --- 14,17 ---- *************** *** 38,47 **** VER=0.4.0alpha2 ! CPPFLAGS=$(ENCRYPTED_QUERY) $(BIGFILE) $(LARGEFILE_SUPPORT) $(PLATFORM_SUPPORT) CFLAGS=$(WARN_ME_HARDER) $(OPTIMIZE) $(DEBUG) LDFLAGS=-L. LDLIBS=-lreplaypc $(MD5LIB) ! PROGRAMS=ReplayPC httpfs mark-commercial find-GOPs build-ndx ndx-dump un-protect crypt-test rddns dump-guide dump-cg2 dump-headend dump-zipcode2 dump-filedarray rtvguide dump-replaychannels dump-addressbook dump-channelset dump-programset dump-replayshows SCRIPTS=rns DOCS=Authors COPYING Readme.txt --- 37,47 ---- VER=0.4.0alpha2 ! CPPFLAGS=$(BIGFILE) $(LARGEFILE_SUPPORT) $(PLATFORM_SUPPORT) CFLAGS=$(WARN_ME_HARDER) $(OPTIMIZE) $(DEBUG) LDFLAGS=-L. LDLIBS=-lreplaypc $(MD5LIB) ! PROGRAMS=ReplayPC httpfs mark-commercial rddns dump-guide rtvguide ! EXTRA_PROGRAMS=find-GOPs build-ndx ndx-dump un-protect crypt-test dump-cg2 dump-headend dump-zipcode2 dump-filedarray dump-replaychannels dump-addressbook dump-channelset dump-programset dump-replayshows version-test SCRIPTS=rns DOCS=Authors COPYING Readme.txt *************** *** 70,75 **** channelset.o \ ! all: $(LIB) $(PROGRAMS) ! $(PROGRAMS): $(LIB) $(LIB): $(LIBOBJS) ar r $@ $^ --- 70,75 ---- channelset.o \ ! all: $(LIB) $(PROGRAMS) $(EXTRA_PROGRAMS) ! $(PROGRAMS) $(EXTRA_PROGRAMS): $(LIB) $(LIB): $(LIBOBJS) ar r $@ $^ *************** *** 82,86 **** clean: ! -rm *.o $(PROGRAMS) $(LIB) realclean: clean --- 82,86 ---- clean: ! -rm *.o $(PROGRAMS) $(EXTRA_PROGRAMS) $(LIB) realclean: clean |
From: Todd L. <jt...@us...> - 2002-06-16 04:03:16
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv22862 Added Files: version-test.c Log Message: test program for version # parsing function --- NEW FILE: version-test.c --- #include <stdio.h> #include "rtv.h" int main(int argc, char ** argv) { int r; int i; for (i = 1; i < argc; i++) { r = rtv_set_replaytv_version(argv[i]); printf("%-20s ", argv[i]); if (r < 0) printf("Failed\n"); else printf("%d.%d.%d (%d)\n", replaytv_version.major, replaytv_version.minor, replaytv_version.patch, replaytv_version.build); } return 0; } |
From: Todd L. <jt...@us...> - 2002-06-16 04:02:53
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv22749 Modified Files: httpfsclient.c Log Message: instead of compile-time ENC, control encryption with replaytv_version global -- if >= 4.3, use it Index: httpfsclient.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/httpfsclient.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** httpfsclient.c 16 Jun 2002 00:56:18 -0000 1.8 --- httpfsclient.c 16 Jun 2002 04:02:51 -0000 1.9 *************** *** 23,27 **** #include <string.h> - // XXX clean this up after everyone can use encrypted-only static int make_httpfs_url(char * dst, size_t size, const char * address, const char * command, --- 23,26 ---- *************** *** 61,65 **** } ! if (ENC) { unsigned char ctext[2048+32] ; u32 ctextlen; --- 60,65 ---- } ! if (replaytv_version.major >= 5 || ! (replaytv_version.major == 4 && replaytv_version.minor >= 3)) { unsigned char ctext[2048+32] ; u32 ctextlen; |
From: Todd L. <jt...@us...> - 2002-06-16 04:01:59
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv22501 Modified Files: rtvguide.c httpfs.c Log Message: 'httpfs' and 'rtvguide' executables now take a '-s' (software version) argument setting the version of ReplayTV software to support; if not given, uses version from RTV4K_VERSION environment var; if that's not given either, use default hardcoded in rtv.c, currently 4.1.1 (140) Index: rtvguide.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/rtvguide.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rtvguide.c 11 Jun 2002 04:54:58 -0000 1.2 --- rtvguide.c 16 Jun 2002 04:01:55 -0000 1.3 *************** *** 20,24 **** fprintf(stderr, ! "Usage: rtvguide [-a address] [command <args...>]\n" "Commands: get [ -f <dstfile> ] [ -a ] [ -t <timestamp> ]\n" " -a -- auto mode: name file \"snapshot.<address>.<timestamp>\"\n" --- 20,24 ---- fprintf(stderr, ! "Usage: rtvguide [-a address] [-s software version] [command <args...>]\n" "Commands: get [ -f <dstfile> ] [ -a ] [ -t <timestamp> ]\n" " -a -- auto mode: name file \"snapshot.<address>.<timestamp>\"\n" *************** *** 27,31 **** " -t -- if a timestamp is given, only output if the data has\n" " changed.\n\n" ! "Address defaults to $RTV4K_ADDRESS, if that's set; if not, -a must be used\n"); exit(err ? 1 : 0); } --- 27,35 ---- " -t -- if a timestamp is given, only output if the data has\n" " changed.\n\n" ! "Address defaults to $RTV4K_ADDRESS, if that's set; if not, -a must be used\n" ! "Software version defaults to 4.1.1 (140); can be set with $RTV4K_VERSION\n" ! "or -s; format should be like '520411140' or '4.1.1.140'\n" ! ! ); exit(err ? 1 : 0); } *************** *** 109,113 **** int main(int argc, char ** argv) { ! char * address; int num_commands = sizeof(commands)/sizeof(commands[0]); int ch; --- 113,117 ---- int main(int argc, char ** argv) { ! char * address, * version; int num_commands = sizeof(commands)/sizeof(commands[0]); int ch; *************** *** 117,122 **** address = getenv("RTV4K_ADDRESS"); ! ! while ((ch = getopt(argc, argv, "+a:")) != EOF) { switch(ch) { case 'a': --- 121,127 ---- address = getenv("RTV4K_ADDRESS"); ! version = getenv("RTV4K_VERSION"); ! ! while ((ch = getopt(argc, argv, "+a:s:")) != EOF) { switch(ch) { case 'a': *************** *** 132,135 **** --- 137,144 ---- my_optind = optind; optind = 1; + + if (version) + if (rtv_set_replaytv_version(version) != 0) + usage("Invalid software version"); for (i = 0; i < num_commands; i++) { Index: httpfs.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/httpfs.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** httpfs.c 12 Jun 2002 07:42:11 -0000 1.14 --- httpfs.c 16 Jun 2002 04:01:55 -0000 1.15 *************** *** 42,46 **** fprintf(stderr, ! "Usage: httpfs [-a address] [command <args...>]\n" "Commands:\n" " ls [-l] [path]\n" --- 42,46 ---- fprintf(stderr, ! "Usage: httpfs [-a address] [-s software_version] [command <args...>]\n" "Commands:\n" " ls [-l] [path]\n" *************** *** 63,67 **** " 3: pretty-printed status graphs for humans to look at (default)\n" "\n" ! "Address defaults to $RTV4K_ADDRESS, if that's set; if not, -a must be used\n"); exit(err ? 1 : 0); --- 63,70 ---- " 3: pretty-printed status graphs for humans to look at (default)\n" "\n" ! "Address defaults to $RTV4K_ADDRESS, if that's set; if not, -a must be used\n" ! "Software version defaults to 4.1.1 (140); can be set with $RTV4K_VERSION\n" ! "or -s; format should be like '520411140' or '4.1.1.140'\n" ! ); exit(err ? 1 : 0); *************** *** 677,680 **** --- 680,684 ---- { char * address; + char * version; int num_commands = sizeof(commands)/sizeof(commands[0]); int ch; *************** *** 684,693 **** address = getenv("RTV4K_ADDRESS"); ! ! while ((ch = getopt(argc, argv, "+a:")) != EOF) { switch(ch) { case 'a': address = optarg; break; default: usage("Invalid argument"); --- 688,701 ---- address = getenv("RTV4K_ADDRESS"); ! version = getenv("RTV4K_VERSION"); ! ! while ((ch = getopt(argc, argv, "+a:s:")) != EOF) { switch(ch) { case 'a': address = optarg; break; + case 's': + version = optarg; + break; default: usage("Invalid argument"); *************** *** 696,699 **** --- 704,711 ---- if (optind == argc || address == NULL) usage(NULL); + + if (version) + if (rtv_set_replaytv_version(version) != 0) + usage("Invalid software version"); my_optind = optind; |
From: Todd L. <jt...@us...> - 2002-06-16 04:00:26
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv22116 Modified Files: rtv.h rtv.c Log Message: new global replaytv_version indicates the Replay software version to support; currently only controls whether encrypted queries are used or not, but hopefully any future similar situations can be dealt with the same way Index: rtv.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/rtv.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rtv.h 21 Mar 2002 02:13:09 -0000 1.6 --- rtv.h 16 Jun 2002 04:00:19 -0000 1.7 *************** *** 43,46 **** --- 43,52 ---- #endif + struct replaytv_version { + int major, minor, patch, build; + }; + + extern struct replaytv_version replaytv_version; + extern u16 rtv_to_u16(unsigned char ** pp); extern u32 rtv_to_u32(unsigned char ** pp); *************** *** 49,52 **** --- 55,60 ---- extern void rtv_from_u32(unsigned char ** pp, u32 v); extern void rtv_from_u64(unsigned char ** pp, u64 v); + + extern int rtv_set_replaytv_version(char * version); extern int rtv_split_lines(char * src, char *** dst); Index: rtv.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/rtv.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rtv.c 5 Feb 2002 07:34:41 -0000 1.3 --- rtv.c 16 Jun 2002 04:00:19 -0000 1.4 *************** *** 18,21 **** --- 18,23 ---- #include <stdlib.h> + struct replaytv_version replaytv_version = {4, 1, 1, 190}; + u16 rtv_to_u16(unsigned char ** pp) { *************** *** 94,97 **** --- 96,168 ---- *pp = p; + } + + /* supports formats: + * 520411140 + * 4.1 + * 4.1(140) + * 4.1 (140) + * 4.1.1 + * 4.1.1.140 + * 4.1.1(140) + * 4.1.1 (140) + */ + extern int rtv_set_replaytv_version(char * version) + { + if (strncmp(version, "520", 3) == 0 && + strlen(version) == 9) { + replaytv_version.major = version[3] - '0'; + replaytv_version.minor = version[4] - '0'; + replaytv_version.patch = version[5] - '0'; + replaytv_version.build = atoi(version+6); + return 0; + } + replaytv_version.major = strtoul(version, &version, 10); + if (version == NULL || *version != '.') + return -1; /* need at least major&minor */ + version++; + replaytv_version.minor = strtoul(version, &version, 10); + switch (*version) { + case '\0': /* '4.1' style */ + replaytv_version.patch = 0; + replaytv_version.build = 0; + return 0; + case '.': /* '4.1.1'... style */ + version++; + replaytv_version.patch = strtoul(version, &version, 10); + break; + case ' ': /* '4.1 (140)' */ + case '(': /* '4.1(140)' */ + replaytv_version.patch = 0; + break; + default: + return -1; + } + if (*version == '\0') { /* '4.1.1' */ + replaytv_version.build = 0; + return 0; + } + switch (*version) { + case '.': /* '4.1.1.140' */ + version++; + break; + case ' ': /* '4.1 (140)' or '4.1.1 (140)' */ + version++; + if (*version != '(') + return -1; + version++; + break; + case '(': /* '4.1(140)' or '4.1.1(140)' */ + version++; + break; + default: + return -1; + } + replaytv_version.build = strtoul(version, &version, 10); + if (*version == '\0') + return 0; + if (*version == ')') + return 0; + return -1; } |
From: Todd L. <jt...@us...> - 2002-06-16 00:58:06
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv18542 Modified Files: Makefile Log Message: MD5LIB split out, attempt made to autoset new 'bindist' target ranlib is run on the library, to make BSDs happy Index: Makefile =================================================================== RCS file: /cvsroot/replaypc/replaypc/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 11 Jun 2002 04:54:58 -0000 1.12 --- Makefile 16 Jun 2002 00:58:03 -0000 1.13 *************** *** 11,14 **** --- 11,27 ---- # GNU General Public License for more details. + BIGFILE=-DBIGFILE_BY_STDIO + LARGEFILE_SUPPORT=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + PLATFORM_SUPPORT=-D__unix__ + ENCRYPTED_QUERY=-DENC + PLATFORM=$(shell /usr/libexec/config.guess) + + ifneq ($(findstring darwin,$(PLATFORM)),) + MD5LIB=-lcrypto + else + MD5LIB=-lssl + endif + + # compiler-specific items: # -Wwrite-strings WARN_ME_HARDER=-Wall -W -Wshadow -Wpointer-arith \ *************** *** 20,37 **** WARNINGS=$(WARN_ME_HARDER) - BIGFILE=-DBIGFILE_BY_STDIO - LARGEFILE_SUPPORT=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - PLATFORM_SUPPORT=-D__unix__ - ENCRYPTED_QUERY=-DENC - # it's hoped you won't need to modify anything below here to compile # on a Unix system CPPFLAGS=$(ENCRYPTED_QUERY) $(BIGFILE) $(LARGEFILE_SUPPORT) $(PLATFORM_SUPPORT) CFLAGS=$(WARN_ME_HARDER) $(OPTIMIZE) $(DEBUG) LDFLAGS=-L. ! LDLIBS=-lreplaypc -lssl PROGRAMS=ReplayPC httpfs mark-commercial find-GOPs build-ndx ndx-dump un-protect crypt-test rddns dump-guide dump-cg2 dump-headend dump-zipcode2 dump-filedarray rtvguide dump-replaychannels dump-addressbook dump-channelset dump-programset dump-replayshows LIB=libreplaypc.a --- 33,49 ---- WARNINGS=$(WARN_ME_HARDER) # it's hoped you won't need to modify anything below here to compile # on a Unix system + VER=0.4.0alpha2 + CPPFLAGS=$(ENCRYPTED_QUERY) $(BIGFILE) $(LARGEFILE_SUPPORT) $(PLATFORM_SUPPORT) CFLAGS=$(WARN_ME_HARDER) $(OPTIMIZE) $(DEBUG) LDFLAGS=-L. ! LDLIBS=-lreplaypc $(MD5LIB) PROGRAMS=ReplayPC httpfs mark-commercial find-GOPs build-ndx ndx-dump un-protect crypt-test rddns dump-guide dump-cg2 dump-headend dump-zipcode2 dump-filedarray rtvguide dump-replaychannels dump-addressbook dump-channelset dump-programset dump-replayshows + SCRIPTS=rns + DOCS=Authors COPYING Readme.txt LIB=libreplaypc.a *************** *** 62,66 **** --- 74,87 ---- $(LIB): $(LIBOBJS) ar r $@ $^ + ranlib $(LIB) + + bindist: all + -mkdir replaypc-$(VER)-$(PLATFORM) + cp $(PROGRAMS) $(SCRIPTS) $(DOCS) replaypc-$(VER)-$(PLATFORM) + tar cf - replaypc-$(VER)-$(PLATFORM) | gzip > replaypc-$(VER)-$(PLATFORM).tar.gz clean: -rm *.o $(PROGRAMS) $(LIB) + + realclean: clean + -rm -rf replaypc-$(VER)-$(PLATFORM) replaypc-$(VER)-$(PLATFORM).tar.gz |
From: Todd L. <jt...@us...> - 2002-06-16 00:56:22
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv18245 Modified Files: rddnsclient.c httpfsclient.c crypt.h crypt.c crypt-test.c Log Message: crypt.c: support for darwin's rather funky md5 -- openssl *libraries* are there, but the header files aren't. there is an almost compatible header file as <sys/md5.h>, but the names aren't quite right. deal with that. crypt.[ch]: rename encrypt() and decrypt() to rtv_encrypt() and rtv_decrypt(), to avoid namespace collision with darwin libs crypt-test.c, httpfsclient.c, rddnsclient.c: use renamed funcs Index: rddnsclient.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/rddnsclient.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rddnsclient.c 11 Jun 2002 04:50:10 -0000 1.4 --- rddnsclient.c 16 Jun 2002 00:56:18 -0000 1.5 *************** *** 32,38 **** struct decrypt_callback_data * d = vp; ! decrypt(cyphertext, cyphertext_len, ! d->plaintext_buffer, d->plaintext_buffer_len, ! &d->t, &d->plaintext_len, 0); free(cyphertext); } --- 32,38 ---- struct decrypt_callback_data * d = vp; ! rtv_decrypt(cyphertext, cyphertext_len, ! d->plaintext_buffer, d->plaintext_buffer_len, ! &d->t, &d->plaintext_len, 0); free(cyphertext); } *************** *** 53,58 **** decrypt_data.plaintext_buffer_len = result_buffer_len; ! if (encrypt(querystring, strlen(querystring), ! cyphertext, sizeof cyphertext, &cyphertext_len, 0) < 0) { fprintf(stderr, "ERROR: encrypt failure\n"); return -1; --- 53,58 ---- decrypt_data.plaintext_buffer_len = result_buffer_len; ! if (rtv_encrypt(querystring, strlen(querystring), ! cyphertext, sizeof cyphertext, &cyphertext_len, 0) < 0) { fprintf(stderr, "ERROR: encrypt failure\n"); return -1; Index: httpfsclient.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/httpfsclient.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** httpfsclient.c 11 Jun 2002 04:46:56 -0000 1.7 --- httpfsclient.c 16 Jun 2002 00:56:18 -0000 1.8 *************** *** 68,72 **** l += strlen(d); d += strlen(d); ! encrypt(argbuf+1, strlen(argbuf)-1, ctext, sizeof ctext, &ctextlen, 1); for (i = 0; i < ctextlen; i++) d += sprintf(d, "%02x", ctext[i]); --- 68,73 ---- l += strlen(d); d += strlen(d); ! rtv_encrypt(argbuf+1, strlen(argbuf)-1, ctext, sizeof ctext, ! &ctextlen, 1); for (i = 0; i < ctextlen; i++) d += sprintf(d, "%02x", ctext[i]); Index: crypt.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/crypt.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** crypt.h 11 Jun 2002 04:38:50 -0000 1.5 --- crypt.h 16 Jun 2002 00:56:18 -0000 1.6 *************** *** 18,28 **** #include "rtv.h" ! int decrypt(const char * cyphertext, u32 cypherlength, ! char * plainbuf, u32 plainbuflength, ! u32 * time, u32 * plainlen, ! int checksum_num); ! int encrypt(const char * plaintext, u32 plaintext_len, ! char * cyphertext, u32 buffer_len, u32 * cyphertext_len, ! int checksum_num); #endif --- 18,28 ---- #include "rtv.h" ! int rtv_decrypt(const char * cyphertext, u32 cypherlength, ! char * plainbuf, u32 plainbuflength, ! u32 * time, u32 * plainlen, ! int checksum_num); ! int rtv_encrypt(const char * plaintext, u32 plaintext_len, ! char * cyphertext, u32 buffer_len, u32 * cyphertext_len, ! int checksum_num); #endif Index: crypt.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/crypt.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** crypt.c 11 Jun 2002 04:38:50 -0000 1.8 --- crypt.c 16 Jun 2002 00:56:18 -0000 1.9 *************** *** 18,22 **** --- 18,30 ---- #include <stdlib.h> #include <time.h> + + #ifdef __APPLE__ + #define MD5Init MD5_Init + #define MD5Update MD5_Update + #define MD5Final MD5_Final + #include <sys/md5.h> + #else #include <openssl/md5.h> + #endif static void checksum(unsigned char * dest, unsigned const char * src, u32 len, *************** *** 76,83 **** */ ! int decrypt(const char * cyphertext, u32 cyphertext_len, ! char * plainbuf, u32 plainbuf_len, ! u32 * p_time, u32 * p_plain_len, ! int checksum_num) { unsigned char key_buf[4]; --- 84,91 ---- */ ! int rtv_decrypt(const char * cyphertext, u32 cyphertext_len, ! char * plainbuf, u32 plainbuf_len, ! u32 * p_time, u32 * p_plain_len, ! int checksum_num) { unsigned char key_buf[4]; *************** *** 149,155 **** } ! int encrypt(const char * plaintext, u32 plaintext_len, ! char * cyphertext, u32 buffer_len, u32 * cyphertext_len, ! int checksum_num) { u32 key; --- 157,163 ---- } ! int rtv_encrypt(const char * plaintext, u32 plaintext_len, ! char * cyphertext, u32 buffer_len, u32 * cyphertext_len, ! int checksum_num) { u32 key; Index: crypt-test.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/crypt-test.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** crypt-test.c 11 Jun 2002 04:38:50 -0000 1.4 --- crypt-test.c 16 Jun 2002 00:56:18 -0000 1.5 *************** *** 31,37 **** memset(plaintext2, 0, sizeof plaintext2); ! r = decrypt(cyphertext1, ctext_len, ! plaintext1, sizeof plaintext1, ! &t, &plain_length, checksum_num); if (r != 0) { printf("error decrypting original!\n"); --- 31,37 ---- memset(plaintext2, 0, sizeof plaintext2); ! r = rtv_decrypt(cyphertext1, ctext_len, ! plaintext1, sizeof plaintext1, ! &t, &plain_length, checksum_num); if (r != 0) { printf("error decrypting original!\n"); *************** *** 41,46 **** printf("1st plaintext: :%.*s: (length=%ld, timestamp=%ld)\n", (int)plain_length, plaintext1, plain_length, t); ! r = encrypt(plaintext1, plain_length, ! cyphertext2, sizeof cyphertext2, &cypher_length, checksum_num); if (r != 0) { printf("error re-encrypting\n"); --- 41,47 ---- printf("1st plaintext: :%.*s: (length=%ld, timestamp=%ld)\n", (int)plain_length, plaintext1, plain_length, t); ! r = rtv_encrypt(plaintext1, plain_length, ! cyphertext2, sizeof cyphertext2, ! &cypher_length, checksum_num); if (r != 0) { printf("error re-encrypting\n"); *************** *** 48,54 **** } ! r = decrypt(cyphertext2, cypher_length, ! plaintext2, sizeof plaintext2, ! &t, &plain_length, checksum_num); if (r != 0) { printf("error decrypting original!\n"); --- 49,55 ---- } ! r = rtv_decrypt(cyphertext2, cypher_length, ! plaintext2, sizeof plaintext2, ! &t, &plain_length, checksum_num); if (r != 0) { printf("error decrypting original!\n"); |
From: Todd L. <jt...@us...> - 2002-06-12 07:42:14
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv15228 Modified Files: httpfs.c ReplayPC.c Log Message: change the default (hardcoded, for ReplayPC) inter-chunk delay to 75usec Index: httpfs.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/httpfs.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** httpfs.c 11 Jun 2002 04:49:25 -0000 1.13 --- httpfs.c 12 Jun 2002 07:42:11 -0000 1.14 *************** *** 437,441 **** const char * name; int ch; ! u32 delay = 500; memset(&data, 0, sizeof data); --- 437,441 ---- const char * name; int ch; ! u32 delay = 75; memset(&data, 0, sizeof data); Index: ReplayPC.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/ReplayPC.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ReplayPC.c 11 Jun 2002 04:51:40 -0000 1.8 --- ReplayPC.c 12 Jun 2002 07:42:11 -0000 1.9 *************** *** 360,364 **** //Send the request for the file ! i = hfs_do_chunked(GetMpgCallback, &data, IPAddress, 500, "readfile", "pos", "0", --- 360,364 ---- //Send the request for the file ! i = hfs_do_chunked(GetMpgCallback, &data, IPAddress, 75, "readfile", "pos", "0", |
From: Todd L. <jt...@us...> - 2002-06-11 04:55:01
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv19175 Modified Files: .cvsignore Makefile rddns.c rtvguide.c Removed Files: dump-replayshows Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/replaypc/replaypc/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 8 Apr 2002 22:18:26 -0000 1.4 --- .cvsignore 11 Jun 2002 04:54:58 -0000 1.5 *************** *** 7,13 **** --- 7,15 ---- dump-addressbook dump-cg2 + dump-channelset dump-filedarray dump-guide dump-headend + dump-programset dump-replaychannels dump-zipcode2 Index: Makefile =================================================================== RCS file: /cvsroot/replaypc/replaypc/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile 30 Mar 2002 00:44:23 -0000 1.11 --- Makefile 11 Jun 2002 04:54:58 -0000 1.12 *************** *** 23,36 **** LARGEFILE_SUPPORT=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PLATFORM_SUPPORT=-D__unix__ # it's hoped you won't need to modify anything below here to compile # on a Unix system ! CPPFLAGS=$(BIGFILE) $(LARGEFILE_SUPPORT) $(PLATFORM_SUPPORT) CFLAGS=$(WARN_ME_HARDER) $(OPTIMIZE) $(DEBUG) LDFLAGS=-L. ! LDLIBS=-lssl -lreplaypc ! PROGRAMS=ReplayPC httpfs mark-commercial find-GOPs build-ndx ndx-dump un-protect crypt-test rddns dump-guide dump-cg2 dump-headend dump-zipcode2 dump-filedarray rtvguide dump-replaychannels dump-addressbook LIB=libreplaypc.a --- 23,37 ---- LARGEFILE_SUPPORT=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PLATFORM_SUPPORT=-D__unix__ + ENCRYPTED_QUERY=-DENC # it's hoped you won't need to modify anything below here to compile # on a Unix system ! CPPFLAGS=$(ENCRYPTED_QUERY) $(BIGFILE) $(LARGEFILE_SUPPORT) $(PLATFORM_SUPPORT) CFLAGS=$(WARN_ME_HARDER) $(OPTIMIZE) $(DEBUG) LDFLAGS=-L. ! LDLIBS=-lreplaypc -lssl ! PROGRAMS=ReplayPC httpfs mark-commercial find-GOPs build-ndx ndx-dump un-protect crypt-test rddns dump-guide dump-cg2 dump-headend dump-zipcode2 dump-filedarray rtvguide dump-replaychannels dump-addressbook dump-channelset dump-programset dump-replayshows LIB=libreplaypc.a *************** *** 55,59 **** sleep.o \ zipcode.o \ ! all: $(LIB) $(PROGRAMS) --- 56,60 ---- sleep.o \ zipcode.o \ ! channelset.o \ all: $(LIB) $(PROGRAMS) Index: rddns.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/rddns.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rddns.c 21 Mar 2002 23:28:43 -0000 1.3 --- rddns.c 11 Jun 2002 04:54:58 -0000 1.4 *************** *** 26,29 **** --- 26,30 ---- "\n" "ISN format: 00055-09166-55000\n"); + if (error) exit(1); Index: rtvguide.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/rtvguide.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rtvguide.c 25 Mar 2002 00:19:15 -0000 1.1 --- rtvguide.c 11 Jun 2002 04:54:58 -0000 1.2 *************** *** 145,151 **** return r; } - - - - - --- 145,146 ---- --- dump-replayshows DELETED --- |
From: Todd L. <jt...@us...> - 2002-06-11 04:53:21
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv18814 Added Files: dump-replayshows.c dump-replayshows dump-programset.h dump-programset.c dump-channelset.c Log Message: dumping programs for various replay-internal files --- NEW FILE: dump-replayshows.c --- /* * Copyright (C) 2002 John Todd Larason <jt...@mo...> * * This program 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 of the License, or * (at your option) any later version. * * This program 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. */ #include <stdio.h> #include "rtv.h" #include "guide.h" #include "dump.h" struct mapping map[] = { {-1, NULL}, }; static int dump_replay_show_file(FILE * fp) { unsigned char buffer[444]; unsigned char * p; struct replay_show rs; while (fread(buffer, 444, 1, fp)) { p = buffer; parse_replay_show(&p, &rs); dump_replay_show(&rs); } return 0; } int main(int argc, char ** argv) { int i; dump_set_file(stdout); if (argc > 1) { for (i = 1; i < argc; i++) { FILE * fp; fp = fopen(argv[i], "r"); if (!fp) { fprintf(stderr, "Couldn't open %s\n", argv[i]); return -1; } dump_group_start(argv[i]); dump_replay_show_file(fp); dump_group_end(); } } else { dump_group_start("stdin"); dump_replay_show_file(stdin); dump_group_end(); } return 0; } --- NEW FILE: dump-replayshows --- ELF Éuê¸ ÀtìhÀÿèàþÿÿĸ öìh¶®ÿ5èaùÿÿÄFCþv¯ìhø®ÿ5èDùÿÿÄGEÀÁè9Çûþÿÿeô[^_]Ãv ìShê°ÿ5ð ÈB·À$ÉÃöUåVSìuEôEôPèÃÿÿÿÃÁãEô$è³ÿÿÿ·À ÃEôØeø[^]ÃUåWVSì(]EìEìPèªÿÿÿEàEภPèþßÿÿÄ Àtê@Gëæv PèÈßÿÿÄ ÀtêÆ ÞÿÿÄ{ » T 6 T T Y (6,36)=*(0,2) cord:(62,3),128,2208;; ) --- NEW FILE: dump-programset.h --- #include <stdio.h> #include "rtv.h" //#include "programset.h" #include "dump.h" static int dump_programset_file(FILE * fp) { unsigned char header[256]; unsigned char buffer[256]; unsigned char * p; struct fixed_program_record r; int i = 0; { u32 tms_id; u32 unk1; fread(buffer, 8, 1, fp); p = buffer; tms_id = rtv_to_u32(&p); unk1 = rtv_to_u32(&p); dump_group_start("Programset File Header"); dump_u32 ("TMS ID", tms_id); dump_u32 ("Unknown 1", unk1); } while (fread(buffer, 256, 1, fp)) { p = buffer; parse_fixed_program_record(&p, &r); sprintf(header, "FPR #%d", i); dump_group_start(header); dump_fixed_program_record(&r); dump_group_end(); i++; } return 0; } int main(int argc, char ** argv) { int i; dump_set_file(stdout); if (argc > 1) { for (i = 1; i < argc; i++) { FILE * fp; fp = fopen(argv[i], "r"); if (!fp) { fprintf(stderr, "Couldn't open %s\n", argv[i]); return -1; } dump_group_start(argv[i]); dump_programset_file(fp); dump_group_end(); } } else { dump_group_start("stdin"); dump_programset_file(stdin); dump_group_end(); } return 0; } --- NEW FILE: dump-programset.c --- #include <stdio.h> #include "rtv.h" //#include "programset.h" #include "dump.h" #include "cg.h" static int dump_programset_file(FILE * fp) { unsigned char header[256]; unsigned char buffer[256]; unsigned char * bigbuf; unsigned char * p; struct fixed_program_record r; u32 tms_id; u32 length; int i = 0; while (fread(buffer, 8, 1, fp)) { p = buffer; tms_id = rtv_to_u32(&p); length = rtv_to_u32(&p); bigbuf = malloc(length); expect(bigbuf != NULL); dump_group_start("Programset Channel"); dump_u32 ("TMS ID", tms_id); dump_u32 ("Length", length); fread(bigbuf, length, 1, fp); for (p = bigbuf, parse_fixed_program_record(&p, &r, 1); p < bigbuf + length; parse_fixed_program_record(&p, &r, 1)) { sprintf(header, "FPR #%d", i); dump_group_start(header); dump_fixed_program_record(&r); dump_group_end(); i++; } dump_group_end (); free(bigbuf); } return 0; } int main(int argc, char ** argv) { int i; dump_set_file(stdout); if (argc > 1) { for (i = 1; i < argc; i++) { FILE * fp; fp = fopen(argv[i], "r"); if (!fp) { fprintf(stderr, "Couldn't open %s\n", argv[i]); return -1; } dump_group_start(argv[i]); dump_programset_file(fp); dump_group_end(); } } else { dump_group_start("stdin"); dump_programset_file(stdin); dump_group_end(); } return 0; } --- NEW FILE: dump-channelset.c --- #include <stdio.h> #include "rtv.h" #include "channelset.h" #include "dump.h" static int dump_channelset_file(FILE * fp) { unsigned char header[256]; unsigned char buffer[68]; unsigned char * p; struct channelset_channel c; int i = 0; while (fread(buffer, 68, 1, fp)) { p = buffer; parse_channelset_channel(&p, &c); sprintf(header, "Channelset File entry #%d", i); dump_group_start(header); dump_channelset_channel(&c); dump_group_end(); i++; } return 0; } int main(int argc, char ** argv) { int i; dump_set_file(stdout); if (argc > 1) { for (i = 1; i < argc; i++) { FILE * fp; fp = fopen(argv[i], "r"); if (!fp) { fprintf(stderr, "Couldn't open %s\n", argv[i]); return -1; } dump_group_start(argv[i]); dump_channelset_file(fp); dump_group_end(); } } else { dump_group_start("stdin"); dump_channelset_file(stdin); dump_group_end(); } return 0; } |
From: Todd L. <jt...@us...> - 2002-06-11 04:52:44
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv18674 Added Files: channelset.h channelset.c Log Message: channelset file dumping & parsing funcs --- NEW FILE: channelset.h --- #ifndef CHANNELSET_H #define CHANNELSET_H #include "headend.h" struct channelset_channel { /* 0 */ struct headend_channel headend_channel; /* 56 */ u8 headend_name[8]; /* 64 */ u32 channelguide_index; }; /* 68 */ int parse_channelset_channel(unsigned char ** pp, struct channelset_channel * c); void dump_channelset_channel(struct channelset_channel * c); #endif --- NEW FILE: channelset.c --- #include <stdlib.h> #include <string.h> #include "rtv.h" #include "channelset.h" #include "dump.h" int parse_channelset_channel(unsigned char ** pp, struct channelset_channel * c) { unsigned char * p = *pp; parse_headend_channel(&p, &c->headend_channel); memcpy(c->headend_name, p, 8); p += 8; c->channelguide_index = rtv_to_u32(&p); *pp = p; return 0; } void dump_channelset_channel(struct channelset_channel * c) { dump_group_start ("Channelset Channel"); dump_headend_channel(&c->headend_channel); dump_string ("Headend Name", c->headend_name); dump_u32 ("ChannelGuide Index", c->channelguide_index); dump_group_end (); } |
From: Todd L. <jt...@us...> - 2002-06-11 04:51:43
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv18459 Modified Files: ReplayPC.c Log Message: update for new nc_init/fini system fix delay -- .5 seconds, not 5 seconds Index: ReplayPC.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/ReplayPC.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ReplayPC.c 30 Mar 2002 00:38:49 -0000 1.7 --- ReplayPC.c 11 Jun 2002 04:51:40 -0000 1.8 *************** *** 176,183 **** } - if (nc_init() < 0) { - exit(-1); - } - //Do as we are instructed if (fGetDir) GetDir(IPAddress); --- 176,179 ---- *************** *** 187,193 **** if (fDoCommand) DoCommand(IPAddress, Command, fStdOut); - //shutdown windows sockets (On Windows Only) - nc_fini(); - //cleanup and exit return 0; --- 183,186 ---- *************** *** 367,371 **** //Send the request for the file ! i = hfs_do_chunked(GetMpgCallback, &data, IPAddress, 5000, "readfile", "pos", "0", --- 360,364 ---- //Send the request for the file ! i = hfs_do_chunked(GetMpgCallback, &data, IPAddress, 500, "readfile", "pos", "0", |
From: Todd L. <jt...@us...> - 2002-06-11 04:50:53
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv18321 Modified Files: sleep.c Log Message: fix include file for windows implementation, and off-by-10 error in units for unix version Index: sleep.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/sleep.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sleep.c 30 Mar 2002 00:26:53 -0000 1.1 --- sleep.c 11 Jun 2002 04:50:49 -0000 1.2 *************** *** 2,6 **** #ifdef WIN32 ! void sleep(u16 msec) { Sleep(msec); --- 2,8 ---- #ifdef WIN32 ! #include "windows.h" ! ! void rtv_sleep(u16 msec) { Sleep(msec); *************** *** 10,14 **** void rtv_sleep(u16 msec) { ! usleep(msec * 100); } #endif --- 12,16 ---- void rtv_sleep(u16 msec) { ! usleep(msec * 1000); } #endif |
From: Todd L. <jt...@us...> - 2002-06-11 04:50:13
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv18229 Modified Files: rddnsclient.c Log Message: update to use the variable-checksum crypt function; rddns uses checksum #0 Index: rddnsclient.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/rddnsclient.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rddnsclient.c 21 Mar 2002 23:28:43 -0000 1.3 --- rddnsclient.c 11 Jun 2002 04:50:10 -0000 1.4 *************** *** 34,38 **** decrypt(cyphertext, cyphertext_len, d->plaintext_buffer, d->plaintext_buffer_len, ! &d->t, &d->plaintext_len); free(cyphertext); } --- 34,38 ---- decrypt(cyphertext, cyphertext_len, d->plaintext_buffer, d->plaintext_buffer_len, ! &d->t, &d->plaintext_len, 0); free(cyphertext); } *************** *** 54,58 **** if (encrypt(querystring, strlen(querystring), ! cyphertext, sizeof cyphertext, &cyphertext_len) < 0) { fprintf(stderr, "ERROR: encrypt failure\n"); return -1; --- 54,58 ---- if (encrypt(querystring, strlen(querystring), ! cyphertext, sizeof cyphertext, &cyphertext_len, 0) < 0) { fprintf(stderr, "ERROR: encrypt failure\n"); return -1; |
From: Todd L. <jt...@us...> - 2002-06-11 04:49:27
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv18092 Modified Files: httpfs.c Log Message: fix the default between-packet delay -- supposed to .5 seconds, not 5 seconds Index: httpfs.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/httpfs.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** httpfs.c 19 May 2002 05:26:09 -0000 1.12 --- httpfs.c 11 Jun 2002 04:49:25 -0000 1.13 *************** *** 437,441 **** const char * name; int ch; ! u32 delay = 5000; memset(&data, 0, sizeof data); --- 437,441 ---- const char * name; int ch; ! u32 delay = 500; memset(&data, 0, sizeof data); |
From: Todd L. <jt...@us...> - 2002-06-11 04:46:59
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv17580 Modified Files: httpfsclient.c Log Message: support for 4500/4.3-style encrypted query strings, if ENC is defined to 1 Index: httpfsclient.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/httpfsclient.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** httpfsclient.c 30 Mar 2002 00:26:30 -0000 1.6 --- httpfsclient.c 11 Jun 2002 04:46:56 -0000 1.7 *************** *** 15,21 **** */ - #include "httpfsclient.h" #include "sleep.h" #include <stdarg.h> --- 15,21 ---- */ #include "httpfsclient.h" #include "sleep.h" + #include "crypt.h" #include <stdarg.h> *************** *** 23,37 **** #include <string.h> static int make_httpfs_url(char * dst, size_t size, const char * address, const char * command, va_list args) { ! char * d, * tag, * value; int argno = 0; size_t l; ! (void) size; ! l = strlen(address) + strlen(command) + strlen("http:///httpfs-"); if (l >= size) { fprintf(stderr, "Error: make_httpfs_url: address + command too long for buffer\n"); --- 23,40 ---- #include <string.h> + // XXX clean this up after everyone can use encrypted-only static int make_httpfs_url(char * dst, size_t size, const char * address, const char * command, va_list args) { ! char * d, * tag, * value, *argp; int argno = 0; size_t l; ! char argbuf[2048]; /* XXX bad, should fix this */ ! (void) size; ! l = strlen(address) + strlen(command) + ! strlen("http:///httpfs-") + strlen("__Q_") + 32; if (l >= size) { fprintf(stderr, "Error: make_httpfs_url: address + command too long for buffer\n"); *************** *** 42,45 **** --- 45,49 ---- d += sprintf(d, "http://%s/httpfs-%s", address, command); + argp = argbuf; while ((tag = va_arg(args, char *)) != NULL) { value = va_arg(args, char *); *************** *** 47,59 **** continue; } ! l += 1+strlen(tag)+1+strlen(value); ! if (l >= size) { ! fprintf(stderr, "Error: make_httpfs_url: with arg %s, buffer too small\n", tag); return -1; } ! d += sprintf(d, "%c%s=%s", argno == 0 ? '?' : '&', tag, value); argno++; } ! return 0; } --- 51,78 ---- continue; } ! // XXX for now, double up for the encrypted copy ! l += 2*(1+strlen(tag)+1+strlen(value)); ! if (l >= sizeof(argbuf)) { /* this isn't quite correct -- counts the whole url against the argbuf. good enough for now */ ! fprintf(stderr, "Error: make_httpfs_url: with arg %s, argbuf too small\n", tag); return -1; } ! argp += sprintf(argp, "%c%s=%s", argno == 0 ? '?' : '&', tag, value); argno++; } ! ! if (ENC) { ! unsigned char ctext[2048+32] ; ! u32 ctextlen; ! unsigned int i; ! strcpy(d, "?__Q_="); ! l += strlen(d); ! d += strlen(d); ! encrypt(argbuf+1, strlen(argbuf)-1, ctext, sizeof ctext, &ctextlen, 1); ! for (i = 0; i < ctextlen; i++) ! d += sprintf(d, "%02x", ctext[i]); ! } else { ! strcpy(d, argbuf); ! } ! return 0; } |
From: Todd L. <jt...@us...> - 2002-06-11 04:41:16
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv16460 Modified Files: netclient.c Log Message: if NC_DUMP environment variable is set, all networking actions are verbosely dumped nc_init and nc_fini are now handled internally new nc_error function suitable for printing out networking errors on all platforms Index: netclient.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/netclient.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** netclient.c 8 Apr 2002 22:16:43 -0000 1.6 --- netclient.c 11 Jun 2002 04:41:13 -0000 1.7 *************** *** 20,23 **** --- 20,24 ---- #include <stdio.h> #include <string.h> + #include <errno.h> #ifdef _WIN32 *************** *** 39,42 **** --- 40,46 ---- #endif + static int nc_do_dump = 0; + static int nc_initted = 0; + struct nc { *************** *** 46,67 **** }; ! int nc_init(void) { #ifdef _WIN32 ! WSADATA wd; ! if (WSAStartup(MAKEWORD(2,2), &wd) == -1) { ! perror("WSAStartup"); ! return -1; } #endif - return 0; } ! int nc_fini(void) { #ifdef _WIN32 ! WSACleanup(); #endif return 0; } --- 50,123 ---- }; ! static void nc_fini(void) { + nc_initted = 0; + #ifdef _WIN32 ! WSACleanup(); ! #endif ! } ! static void nc_dump(char * tag, unsigned char * buf, size_t sz) ! { ! unsigned int rows, row, col, i, c; ! if (!nc_do_dump) ! return; ! fprintf(stderr, "NC DUMP: %s\n", tag); ! rows = (sz + 15)/16; ! for (row = 0; row < rows; row++) { ! fprintf(stderr, "| "); ! for (col = 0; col < 16; col++) { ! i = row * 16 + col; ! if (i < sz) ! fprintf(stderr, "%02x", buf[i]); ! else ! fprintf(stderr, " "); ! if ((i & 3) == 3) ! fprintf(stderr, " "); ! } ! fprintf(stderr, " | "); ! for (col = 0; col < 16; col++) { ! i = row * 16 + col; ! if (i < sz) { ! c = buf[i]; ! fprintf(stderr, "%c", (c >= ' ' && c <= '~') ? c : '.'); ! } else { ! fprintf(stderr, " "); ! } ! if ((i & 3) == 3) ! fprintf(stderr, " "); ! } ! fprintf(stderr, " |\n"); } + } + + void nc_error(char * where) + { + #ifdef _WIN32 + fprintf(stderr, "NC error:%s:%d/%d\n", where, errno, WSAGetLastError()); + #else + fprintf(stderr, "NC error:%s:%d:%s\n", where, errno, strerror(errno)); #endif } ! static int nc_init(void) { #ifdef _WIN32 ! WSADATA wd; ! ! nc_dump("initting", NULL, 0); ! ! if (WSAStartup(MAKEWORD(2,2), &wd) == -1) { ! nc_error("WSAStartup"); ! return -1; ! } #endif + nc_initted = 1; + + if (getenv("NC_DUMP")) + nc_do_dump = 1; + + atexit(nc_fini); return 0; } *************** *** 71,74 **** --- 127,137 ---- struct nc * nc; struct sockaddr_in address; + + if (!nc_initted) { + if (nc_init()) { + fprintf(stderr, "Couldn't initialize netclient library\n"); + return NULL; + } + } nc = malloc(sizeof *nc); *************** *** 85,98 **** address.sin_addr.s_addr = inet_addr(address_str); nc->fd = socket(AF_INET, SOCK_STREAM, 0); if (nc->fd == INVALID_SOCKET) { ! perror("open_nc socket"); return NULL; } if (connect(nc->fd, (struct sockaddr *)&address, sizeof(address)) == -1) { ! perror("open_nc connect"); return NULL; } return nc; --- 148,165 ---- address.sin_addr.s_addr = inet_addr(address_str); + nc_dump("creating socket", NULL, 0); nc->fd = socket(AF_INET, SOCK_STREAM, 0); if (nc->fd == INVALID_SOCKET) { ! nc_error("open_nc socket"); return NULL; } + nc_dump("created", NULL, 0); + nc_dump("connecting", NULL, 0); if (connect(nc->fd, (struct sockaddr *)&address, sizeof(address)) == -1) { ! nc_error("open_nc connect"); return NULL; } + nc_dump("connected", NULL, 0); return nc; *************** *** 104,108 **** --- 171,177 ---- if (nc->fd >= 0) { + nc_dump("closing", NULL, 0); r = closesocket(nc->fd); + nc_dump("closed", NULL, 0); } free(nc); *************** *** 113,122 **** static void fill_rcv_buf(struct nc * nc) { ! nc->high = recv(nc->fd, nc->rcv_buf, sizeof(nc->rcv_buf), 0); nc->low = 0; ! if (nc->high <= 0) { /* XXX -- error or closed, return whatever we got*/ nc->high = 0; } } --- 182,199 ---- static void fill_rcv_buf(struct nc * nc) { ! int r; ! ! nc_dump("receiving...", NULL, 0); ! r = recv(nc->fd, nc->rcv_buf, sizeof(nc->rcv_buf), 0); nc->low = 0; ! if (r <= 0) { ! if (r < 0) ! nc_error("fill_rcv_buf recv"); /* XXX -- error or closed, return whatever we got*/ nc->high = 0; + } else { + nc->high = r; } + nc_dump("received", nc->rcv_buf, nc->high); } *************** *** 165,168 **** int nc_write(struct nc * nc, unsigned char * buf, size_t len) { ! return send(nc->fd, buf, len, 0); } --- 242,251 ---- int nc_write(struct nc * nc, unsigned char * buf, size_t len) { ! int r; ! nc_dump("sending...", buf, len); ! r = send(nc->fd, buf, len, 0); ! if (r < 0) ! nc_error("nc_write"); ! nc_dump("sent", NULL, 0); ! return r; } |
From: Todd L. <jt...@us...> - 2002-06-11 04:40:22
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv16275 Modified Files: netclient.h Log Message: nc_init and nc_fini are now handled internally new nc_error function suitable for printing out networking errors on all platforms Index: netclient.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/netclient.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** netclient.h 5 Feb 2002 07:34:41 -0000 1.5 --- netclient.h 11 Jun 2002 04:40:19 -0000 1.6 *************** *** 20,25 **** struct nc; ! extern int nc_init(void); ! extern int nc_fini(void); extern struct nc * nc_open(char * address, short port); extern int nc_close(struct nc * nc); --- 20,24 ---- struct nc; ! extern void nc_error(char * where); extern struct nc * nc_open(char * address, short port); extern int nc_close(struct nc * nc); |
From: Todd L. <jt...@us...> - 2002-06-11 04:38:53
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv15946 Modified Files: crypt.h crypt.c crypt-test.c Log Message: support for 4.3's alternate checksum, used in http query strings support for a TIMEOFF environment variable -- if set, a number of seconds to add to the system time to use in the encrypted block; the http decrypter checks it and it needs to be pretty close Index: crypt.h =================================================================== RCS file: /cvsroot/replaypc/replaypc/crypt.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** crypt.h 21 Mar 2002 23:28:43 -0000 1.4 --- crypt.h 11 Jun 2002 04:38:50 -0000 1.5 *************** *** 20,27 **** int decrypt(const char * cyphertext, u32 cypherlength, char * plainbuf, u32 plainbuflength, ! u32 * time, u32 * plainlen); int encrypt(const char * plaintext, u32 plaintext_len, ! char * cyphertext, u32 buffer_len, u32 * cyphertext_len); ! #endif --- 20,28 ---- int decrypt(const char * cyphertext, u32 cypherlength, char * plainbuf, u32 plainbuflength, ! u32 * time, u32 * plainlen, ! int checksum_num); int encrypt(const char * plaintext, u32 plaintext_len, ! char * cyphertext, u32 buffer_len, u32 * cyphertext_len, ! int checksum_num); #endif Index: crypt.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/crypt.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** crypt.c 8 Apr 2002 22:13:37 -0000 1.7 --- crypt.c 11 Jun 2002 04:38:50 -0000 1.8 *************** *** 20,28 **** #include <openssl/md5.h> ! static void checksum(unsigned char * dest, unsigned const char * src, u32 len) { MD5_CTX c; ! unsigned char extradata[] = { 0x41,0x47,0xc8,0x09, 0xba,0x3c,0x99,0x6a, 0xda,0x09,0x9a,0x0f, 0xc0,0xd3,0x47,0xca, --- 20,29 ---- #include <openssl/md5.h> ! static void checksum(unsigned char * dest, unsigned const char * src, u32 len, ! int checksum_num) { MD5_CTX c; ! static unsigned char extradata[][64] = {{ 0x41,0x47,0xc8,0x09, 0xba,0x3c,0x99,0x6a, 0xda,0x09,0x9a,0x0f, 0xc0,0xd3,0x47,0xca, *************** *** 33,40 **** 0x53,0x8d,0x4c,0xab, 0x13,0xa5,0x16,0x00, 0xff,0xb8,0x4b,0x20, 0x29,0x22,0x9d,0xee, ! }; MD5_Init(&c); MD5_Update(&c, src, len); ! MD5_Update(&c, extradata, sizeof extradata); MD5_Final(dest, &c); } --- 34,51 ---- 0x53,0x8d,0x4c,0xab, 0x13,0xa5,0x16,0x00, 0xff,0xb8,0x4b,0x20, 0x29,0x22,0x9d,0xee, ! }, { ! 0xda,0x76,0x5c,0xd4, 0x34,0xc3,0xd7,0x2c, ! 0xac,0x40,0xb8,0xd8, 0x59,0xbc,0x59,0x34, ! 0xaa,0xbf,0x89,0xbd, 0x85,0xe8,0x40,0x27, ! 0x78,0x2b,0x18,0x6e, 0xa6,0x6e,0x5a,0xc6, ! 0xda,0xe3,0x86,0x84, 0x40,0x14,0x2a,0x23, ! 0x4f,0x5d,0x38,0x5e, 0x7f,0xd9,0x73,0x7d, ! 0xe4,0x80,0x3d,0x21, 0x28,0x41,0xf1,0xb2, ! 0x96,0x43,0x2b,0xcc, 0x0c,0x9d,0x26,0xb9, ! }}; ! MD5_Init(&c); MD5_Update(&c, src, len); ! MD5_Update(&c, extradata[checksum_num], sizeof extradata[checksum_num]); MD5_Final(dest, &c); } *************** *** 67,71 **** int decrypt(const char * cyphertext, u32 cyphertext_len, char * plainbuf, u32 plainbuf_len, ! u32 * p_time, u32 * p_plain_len) { unsigned char key_buf[4]; --- 78,83 ---- int decrypt(const char * cyphertext, u32 cyphertext_len, char * plainbuf, u32 plainbuf_len, ! u32 * p_time, u32 * p_plain_len, ! int checksum_num) { unsigned char key_buf[4]; *************** *** 120,124 **** /* check the checksum */ ! checksum(csum_buf, cyphertext + 24, cyphertext_len - 24); if (memcmp(csum_buf, cyphertext + 8, 16) != 0) return -2; --- 132,136 ---- /* check the checksum */ ! checksum(csum_buf, cyphertext + 24, cyphertext_len - 24, checksum_num); if (memcmp(csum_buf, cyphertext + 8, 16) != 0) return -2; *************** *** 138,142 **** int encrypt(const char * plaintext, u32 plaintext_len, ! char * cyphertext, u32 buffer_len, u32 * cyphertext_len) { u32 key; --- 150,155 ---- int encrypt(const char * plaintext, u32 plaintext_len, ! char * cyphertext, u32 buffer_len, u32 * cyphertext_len, ! int checksum_num) { u32 key; *************** *** 155,158 **** --- 168,175 ---- t = time(NULL); + p = getenv("TIMEOFF"); + if (p) + t += atoi(p); + /* encrypt the key */ p = key_buf; *************** *** 184,188 **** /* fill in the checksum */ ! checksum(cyphertext + 8, cyphertext + 24, plaintext_len + 8); /* and we're done */ --- 201,205 ---- /* fill in the checksum */ ! checksum(cyphertext + 8, cyphertext + 24, plaintext_len + 8, checksum_num); /* and we're done */ Index: crypt-test.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/crypt-test.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** crypt-test.c 21 Mar 2002 23:28:43 -0000 1.3 --- crypt-test.c 11 Jun 2002 04:38:50 -0000 1.4 *************** *** 17,31 **** #include <string.h> ! char cyphertext1[] = {0x7d, 0xd9, 0xc3, 0x54, 0xec, 0x01, 0x14, 0x73, ! 0x10, 0x3f, 0x0a, 0xc5, 0x99, 0x35, 0x12, 0x1e, ! 0x08, 0xaf, 0xd5, 0xc7, 0x1a, 0xb3, 0xfe, 0x80, ! 0xa7, 0x53, 0x72, 0x0d, 0xc9, 0x76, 0xf1, 0x08, ! 0x6c, 0xff, 0xa3, 0xb9, 0x25, 0xcc, 0xed, 0xc1, ! 0x10, 0x41, 0xdd, 0x5d, 0x04, 0xea, 0xcb, 0xf9, ! 0x70, 0x79, 0x3f, 0x74, 0x61, 0x9a, 0x6d, 0xdb, ! 0x17, 0x58, 0x10, 0x10, 0x45, 0xa4, 0x0c ! }; // hourly report ! ! int main(int argc, char ** argv) { unsigned char plaintext1[1024]; --- 17,22 ---- #include <string.h> ! static int test(unsigned char * cyphertext1, size_t ctext_len, ! int checksum_num) { unsigned char plaintext1[1024]; *************** *** 36,45 **** u32 r; ! (void)argc; ! (void)argv; ! ! r = decrypt(cyphertext1, sizeof cyphertext1, plaintext1, sizeof plaintext1, ! &t, &plain_length); if (r != 0) { printf("error decrypting original!\n"); --- 27,37 ---- u32 r; ! memset(plaintext1, 0, sizeof plaintext1); ! memset(cyphertext2, 0, sizeof cyphertext2); ! memset(plaintext2, 0, sizeof plaintext2); ! ! r = decrypt(cyphertext1, ctext_len, plaintext1, sizeof plaintext1, ! &t, &plain_length, checksum_num); if (r != 0) { printf("error decrypting original!\n"); *************** *** 47,53 **** } ! printf("1st plaintext: %.*s\n", (int)plain_length, plaintext1); r = encrypt(plaintext1, plain_length, ! cyphertext2, sizeof cyphertext2, &cypher_length); if (r != 0) { printf("error re-encrypting\n"); --- 39,46 ---- } ! printf("1st plaintext: :%.*s: (length=%ld, timestamp=%ld)\n", ! (int)plain_length, plaintext1, plain_length, t); r = encrypt(plaintext1, plain_length, ! cyphertext2, sizeof cyphertext2, &cypher_length, checksum_num); if (r != 0) { printf("error re-encrypting\n"); *************** *** 57,67 **** r = decrypt(cyphertext2, cypher_length, plaintext2, sizeof plaintext2, ! &t, &plain_length); if (r != 0) { printf("error decrypting original!\n"); return -1; } ! printf("2nd plaintext: %.*s\n", (int)plain_length, plaintext2); ! return strcmp(plaintext1, plaintext2); } --- 50,100 ---- r = decrypt(cyphertext2, cypher_length, plaintext2, sizeof plaintext2, ! &t, &plain_length, checksum_num); if (r != 0) { printf("error decrypting original!\n"); return -1; } ! printf("2nd plaintext: :%.*s: (length=%ld, timestamp=%ld)\n", ! (int)plain_length, plaintext2, plain_length, t); ! return strcmp(plaintext1, plaintext2); + } + + int main(int argc, char ** argv) + { + unsigned char cyphertext1[] = { + 0x7d, 0xd9, 0xc3, 0x54, 0xec, 0x01, 0x14, 0x73, + 0x10, 0x3f, 0x0a, 0xc5, 0x99, 0x35, 0x12, 0x1e, + 0x08, 0xaf, 0xd5, 0xc7, 0x1a, 0xb3, 0xfe, 0x80, + 0xa7, 0x53, 0x72, 0x0d, 0xc9, 0x76, 0xf1, 0x08, + 0x6c, 0xff, 0xa3, 0xb9, 0x25, 0xcc, 0xed, 0xc1, + 0x10, 0x41, 0xdd, 0x5d, 0x04, 0xea, 0xcb, 0xf9, + 0x70, 0x79, 0x3f, 0x74, 0x61, 0x9a, 0x6d, 0xdb, + 0x17, 0x58, 0x10, 0x10, 0x45, 0xa4, 0x0c + }; // hourly report + + unsigned char cyphertext2[] = { + 0x23, 0xaf, 0xcb, 0x48, 0x0b, 0x00, 0x00, 0x6e, + 0x2e, 0xf0, 0x47, 0x1a, 0xb9, 0xa2, 0x32, 0xae, + 0xf8, 0xf7, 0x06, 0xf6, 0xa1, 0xa1, 0xbc, 0xc7, + 0x0a, 0xce, 0xdf, 0x10, 0x05, 0xc0, 0xc8, 0x1d, + 0x46, 0x30, 0x8d, 0xbc, 0x25, 0xce, 0xa6, 0x00, + 0x6c, 0x14, 0xaf + }; // maybe-bad 4.3 query string + int r = 0; + + (void) argc; + (void) argv; + + printf("Testing checksum 0, RDDNS hourly update\n"); + r = test(cyphertext1, sizeof cyphertext1, 0); + if (r) + return r; + + printf("Testing checksum 1, self-generated 4.3 query string\n"); + r = test(cyphertext2, sizeof cyphertext2, 1); + if (r) + return r; + + return 0; } |
From: Todd L. <jt...@us...> - 2002-05-19 05:26:13
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv14196 Modified Files: httpfs.c Log Message: add verbose reporting to writefile make bargraph verbose reporting a little prettier Index: httpfs.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/httpfs.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** httpfs.c 8 Apr 2002 22:16:16 -0000 1.11 --- httpfs.c 19 May 2002 05:26:09 -0000 1.12 *************** *** 77,81 **** percent = (done*100)/total; p = buf; ! *p++ = '|'; for (i = 0; i < 50; i++) { if (i*2 < percent) --- 77,81 ---- percent = (done*100)/total; p = buf; ! *p++ = '['; for (i = 0; i < 50; i++) { if (i*2 < percent) *************** *** 84,88 **** *p++ = ' '; } ! *p++ = '|'; sprintf(p, " %"U64F"d/%"U64F"d (%d%%)\r", done, total, percent); fprintf(fp, "%s", buf); --- 84,88 ---- *p++ = ' '; } ! *p++ = ']'; sprintf(p, " %"U64F"d/%"U64F"d (%d%%)\r", done, total, percent); fprintf(fp, "%s", buf); *************** *** 538,542 **** { BIGFILE * srcfile; ! u64 bytes_to_go; }; --- 538,544 ---- { BIGFILE * srcfile; ! u64 bytes; ! u64 fullsize; ! int verbose; }; *************** *** 546,555 **** int r = 0; size_t l; ! l = MIN(len, wd->bytes_to_go); if (l) { r = bfread(buf, l, 1, wd->srcfile); } ! wd->bytes_to_go -= r * l; return r * l; --- 548,572 ---- int r = 0; size_t l; + u64 bytes_to_go; ! bytes_to_go = wd->fullsize - wd->bytes; ! l = MIN(len, bytes_to_go); if (l) { r = bfread(buf, l, 1, wd->srcfile); } ! wd->bytes += r * l; ! ! switch(wd->verbose) { ! case 2: ! fprintf(stderr, "Total: %"U64F"d\n", wd->fullsize); ! wd->verbose--; ! /* fallthrough */ ! case 1: ! fprintf(stderr, "Written: %"U64F"d\n", wd->bytes); ! break; ! case 3: ! print_status_bar(stderr, wd->bytes, wd->fullsize); ! break; ! } return r * l; *************** *** 562,571 **** const char * pos = NULL; const char * size = NULL; ! const char * dest = NULL; const char * file = NULL; char * data = NULL; int ch; u64 size_num; ! int verbose = 3; while ((ch = getopt(argc, argv, "f:p:s:v:")) != EOF) { --- 579,590 ---- const char * pos = NULL; const char * size = NULL; ! const char * name = NULL; const char * file = NULL; char * data = NULL; int ch; u64 size_num; ! ! memset(&data, 0, sizeof data); ! wd.verbose = 3; while ((ch = getopt(argc, argv, "f:p:s:v:")) != EOF) { *************** *** 581,585 **** break; case 'v': ! verbose = atoi(optarg); break; default: --- 600,604 ---- break; case 'v': ! wd.verbose = atoi(optarg); break; default: *************** *** 590,594 **** if (argc - optind != 1) usage("Need to specify exactly one filename for writefile"); ! dest = argv[optind]; if (!size && !file) --- 609,614 ---- if (argc - optind != 1) usage("Need to specify exactly one filename for writefile"); ! ! name = argv[optind]; if (!size && !file) *************** *** 614,622 **** sscanf(size, "%"U64F"d", &size_num); } ! wd.bytes_to_go = size_num; status = hfs_do_simple(&data, address, "create", ! "name", dest, NULL); free(data); --- 634,643 ---- sscanf(size, "%"U64F"d", &size_num); } ! wd.fullsize = size_num; ! wd.bytes = 0; status = hfs_do_simple(&data, address, "create", ! "name", name, NULL); free(data); *************** *** 628,632 **** "writefile", "pos", pos, ! "name", dest, "size", size, NULL); --- 649,653 ---- "writefile", "pos", pos, ! "name", name, "size", size, NULL); |
From: Todd L. <jt...@us...> - 2002-04-08 22:30:04
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv19913 Modified Files: .cvsignore Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/replaypc/replaypc/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 25 Mar 2002 00:21:39 -0000 1.3 --- .cvsignore 8 Apr 2002 22:18:26 -0000 1.4 *************** *** 5,12 **** --- 5,14 ---- cg crypt-test + dump-addressbook dump-cg2 dump-filedarray dump-guide dump-headend + dump-replaychannels dump-zipcode2 find-GOPs |
From: Todd L. <jt...@us...> - 2002-04-08 22:30:04
|
Update of /cvsroot/replaypc/replaypc In directory usw-pr-cvs1:/tmp/cvs-serv19623 Modified Files: program.c Log Message: replace the partial/guessed-at genre IDs with the complete list of 'TmsGenres' from a Tivo image Index: program.c =================================================================== RCS file: /cvsroot/replaypc/replaypc/program.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** program.c 21 Mar 2002 23:28:43 -0000 1.4 --- program.c 8 Apr 2002 22:17:33 -0000 1.5 *************** *** 63,212 **** struct mapping genre_mapping[] = { ! {1, "action"}, ! {2, "adult"}, ! {3, "adventure"}, ! {4, "animals"}, ! {5, "animated 1"}, ! {6, "animated 2"}, ! {7, "anthology"}, ! {8, "art"}, ! {9, "automotive"}, ! {10, "award shows"}, ! {11, "???: none seen"}, ! {12, "baseball"}, ! {13, "basketball"}, ! {14, "beauty"}, ! {15, "bicycling"}, ! {16, "billiards"}, ! {17, "biography"}, ! {18, "boating"}, ! {19, "bodybuilding"}, ! {20, "bowling"}, ! {21, "boxing"}, ! {22, "business and financial 1"}, ! {23, "business and financial 2"}, ! {24, "business and financial 3"}, ! {25, "business and financial 4"}, ! {26, "children 1"}, ! {27, "children 2"}, ! {28, "children 3"}, ! {29, "children 4"}, ! {30, "classic"}, ! {31, "collectibles"}, ! {32, "comedy"}, ! {33, "comedy-drama"}, ! {34, "computers"}, ! {35, "cooking"}, ! {36, "crime"}, ! {37, "crime drama"}, ! {38, "???: none seen maybe Cycling? it's a More! category"}, ! {39, "dance"}, ! {40, "???: none seen"}, ! {41, "docudrama"}, ! {42, "documentary"}, ! {43, "drama"}, ! {44, "educational"}, ! {45, "electronics"}, ! {46, "equestrian???: hockey, basketball, awards preshow, celebrating the green"}, ! {47, "exercise"}, ! {48, "family"}, ! {49, "fantasy"}, ! {50, "fashion"}, ! {51, "???: andromeda, chuck jones show, dark angel, ray bradbury theater, west wing"}, ! {52, "fishing"}, ! {53, "football"}, ! {54, "???: none seen"}, ! {55, "fundraising"}, ! {56, "game shows"}, ! {57, "golf"}, ! {58, "gymnastics"}, ! {59, "health"}, ! {60, "history"}, ! {61, "historical drama"}, ! {62, "hockey"}, ! {63, "holiday 1"}, ! {64, "holiday 2"}, ! {65, "holiday 3"}, ! {66, "holiday 4"}, ! {67, "holiday 5"}, ! {68, "holiday 6"}, ! {69, "horror"}, ! {70, "horses"}, ! {71, "house & garden"}, ! {72, "housewares"}, ! {73, "how-to"}, ! {74, "international"}, ! {75, "interview"}, ! {76, "jewelry"}, ! {77, "lacross"}, ! {78, "magazine"}, ! {79, "martial arts"}, ! {80, "medical"}, ! {81, "miniseries"}, ! {82, "monster trucks???: monster trucks"}, ! {83, "motorcycles"}, ! {84, "music 1"}, ! {85, "music 2"}, ! {86, "music 3"}, ! {87, "musical 1"}, ! {88, "musical 2"}, ! {89, "musical 3"}, ! {90, "mystery"}, ! {91, "nature"}, ! {92, "news"}, ! {93, "???: super bowl xxxvi gospel celebration"}, ! {94, "olympics"}, ! {95, "opera"}, ! {96, "outdoors"}, ! {97, "???: none seen"}, ! {98, "play"}, ! {99, "public affairs"}, ! {100, "racing"}, ! {101, "???: none seen"}, ! {102, "reality shows"}, ! {103, "religious"}, ! {104, "rodeo"}, ! {105, "romance"}, ! {106, "romantic comedy"}, ! {107, "rugby"}, ! {108, "running"}, ! {109, "satire"}, ! {110, "science"}, ! {111, "science fiction"}, ! {112, "self-help"}, ! {113, "shopping"}, ! {114, "sitcom"}, ! {115, "skating"}, ! {116, "skiing"}, ! {117, "sled dog"}, ! {118, "snow sports"}, ! {119, "soap opera"}, ! {120, "soap opera (spanish)"}, ! {121, "???: none seen"}, ! {122, "???: soapcenter"}, ! {123, "soccer"}, ! {124, "softball???: none seen"}, ! {125, "spanish"}, ! {126, "specials"}, ! {127, "sports 1"}, ! {128, "sports 2"}, ! {129, "sports 3"}, ! {130, "sports 4"}, ! {131, "suspense"}, ! {132, "suspense comedy"}, ! {133, "swimming"}, ! {134, "talk shows"}, ! {135, "tennis"}, ! {136, "thriller"}, ! {137, "track and field"}, ! {138, "travel"}, ! {139, "variety"}, ! {140, "vollyball???: none seen"}, ! {141, "war"}, ! {142, "water sports"}, ! {143, "weather"}, ! {144, "western 1"}, ! {145, "western 2"}, ! {146, "wrestling"}, {-1, NULL} }; --- 63,242 ---- struct mapping genre_mapping[] = { ! {1, "Action" }, ! {2, "AdultsOnly" }, ! {3, "Adventure" }, ! {4, "Animals" }, ! {5, "Animated" }, ! {6, "AnimatedMusical" }, ! {7, "Anthology" }, ! {8, "Art" }, ! {9, "Auto" }, ! {10, "Awards" }, ! {11, "Ballet" }, ! {12, "Baseball" }, ! {13, "Basketball" }, ! {14, "Beauty" }, ! {15, "Bicycle" }, ! {16, "Billiards" }, ! {17, "Biography" }, ! {18, "Boat" }, ! {19, "Bodybuilding" }, ! {20, "Bowling" }, ! {21, "Boxing" }, ! {22, "BusFinancial" }, ! {23, "BusFinancialSpecial" }, ! {24, "BusFinancialTalk" }, ! {25, "Business" }, ! {26, "Children" }, ! {27, "ChildrenSpecial" }, ! {28, "ChildrenTalk" }, ! {29, "ChildrensMusic" }, ! {30, "Classic" }, ! {31, "Collectibles" }, ! {32, "Comedy" }, ! {33, "ComedyDrama" }, ! {34, "Computers" }, ! {35, "Cooking" }, ! {36, "Crime" }, ! {37, "CrimeDrama" }, ! {38, "Curling" }, ! {39, "Dance" }, ! {40, "Diving" }, ! {41, "Docudrama" }, ! {42, "Documentary" }, ! {43, "Drama" }, ! {44, "Educational" }, ! {45, "Electronics" }, ! {46, "Event" }, ! {47, "Exercise" }, ! {48, "Family" }, ! {49, "Fantasy" }, ! {50, "Fashion" }, ! {51, "Fiction" }, ! {52, "Fishing" }, ! {53, "Football" }, ! {54, "French" }, ! {55, "Fundraiser" }, ! {56, "Game" }, ! {57, "Golf" }, ! {58, "Gymnastics" }, ! {59, "Health" }, ! {60, "Historical" }, ! {61, "HistoricalDrama" }, ! {62, "Hockey" }, ! {63, "Holiday" }, ! {64, "HolidayChildren" }, ! {65, "HolidayChildrensSpecial" }, ! {66, "HolidayMusic" }, ! {67, "HolidayMusicSpecial" }, ! {68, "HolidaySpecial" }, ! {69, "Horror" }, ! {70, "Horse" }, ! {71, "HouseGarden" }, ! {72, "Housewares" }, ! {73, "HowTo" }, ! {74, "International" }, ! {75, "Interview" }, ! {76, "Jewelry" }, ! {77, "Lacrosse" }, ! {78, "Magazine" }, ! {79, "MartialArts" }, ! {80, "Medical" }, ! {81, "Miniseries" }, ! {82, "Motor" }, ! {83, "Motorcycle" }, ! {84, "Music" }, ! {85, "MusicSpecial" }, ! {86, "MusicTalk" }, ! {87, "Musical" }, ! {88, "MusicalComedy" }, ! {89, "MusicalRomance" }, ! {90, "Mystery" }, ! {91, "Nature" }, ! {92, "News" }, ! {93, "NonEvent" }, ! {94, "Olympics" }, ! {95, "Opera" }, ! {96, "Outdoors" }, ! {97, "ParentalAdvisory" }, ! {98, "Play" }, ! {99, "PublicAffairs" }, ! {100, "Racing" }, ! {101, "Racquet" }, ! {102, "Reality" }, ! {103, "Religious" }, ! {104, "Rodeo" }, ! {105, "Romance" }, ! {106, "RomanceComedy" }, ! {107, "Rugby" }, ! {108, "Running" }, ! {109, "Satire" }, ! {110, "Science" }, ! {111, "ScienceFiction" }, ! {112, "SelfHelp" }, ! {113, "Shopping" }, ! {114, "Situation" }, ! {115, "Skating" }, ! {116, "Skiing" }, ! {117, "SledDogs" }, ! {118, "Snow" }, ! {119, "Soap" }, ! {120, "SoapOpera" }, ! {121, "SoapSpecial" }, ! {122, "SoapTalk" }, ! {123, "Soccer" }, ! {124, "Softball" }, ! {125, "Spanish" }, ! {126, "Special" }, ! {127, "Sports" }, ! {128, "SportsEvent" }, ! {129, "SportsTalk" }, ! {130, "SportsNonEvent" }, ! {131, "Suspense" }, ! {132, "SuspenseComedy" }, ! {133, "Swimming" }, ! {134, "Talk" }, ! {135, "Tennis" }, ! {136, "Thriller" }, ! {137, "TrackField" }, ! {138, "Travel" }, ! {139, "Variety" }, ! {140, "Volleyball" }, ! {141, "War" }, ! {142, "Water" }, ! {143, "Weather" }, ! {144, "Western" }, ! {145, "WesternComedy" }, ! {146, "Wrestling" }, ! {147, "FrenchBiographie" }, ! {148, "FrenchComedie" }, ! {149, "FrenchComedieDramatique" }, ! {150, "FrenchComedieMusicale" }, ! {151, "FrenchComedieSentimentale" }, ! {152, "FrenchComedieWestern" }, ! {153, "FrenchDessinsAnimes" }, ! {154, "FrenchDocudrame" }, ! {155, "FrenchDocumentaire" }, ! {156, "FrenchDrame" }, ! {157, "FrenchDrameDAction" }, ! {158, "FrenchDrameDAventure" }, ! {159, "FrenchDrameDHorreur" }, ! {160, "FrenchDrameDeGuerre" }, ! {161, "FrenchDramePolicier" }, ! {162, "FrenchDrameHistorique" }, ! {163, "FrenchDrameSentimental" }, ! {164, "FrenchEnfants" }, ! {165, "FrenchFantaisie" }, ! {166, "FrenchMiniSerie" }, ! {167, "FrenchMusicale" }, ! {168, "FrenchMusicaleAnimee" }, ! {169, "FrenchMusicaleSentimentale" }, ! {170, "FrenchMystere" }, ! {171, "FrenchPieceFilmee" }, ! {172, "FrenchPourAdults" }, ! {173, "FrenchScienceFiction" }, ! {174, "FrenchSuspense" }, ! {175, "FrenchSuspenseComedie" }, ! {176, "FrenchWestern" }, {-1, NULL} }; |