libtivohack [TiVo]

Some details

Here is a library I wrote to bypass the broken libc routines found in the TiVo's shared libc. Mostly they do nothing however the "passwd" routines know about the user root and the "services" routines know about a few common services.

Here's a list:

GETHOSTBYNAME(3)

struct hostent *
gethostbyaddr(const char *addr, int len, int type);

struct hostent *
gethostbyname(const char *name);

struct hostent *
gethostbyname2(const char *name, int af);

void
sethostent(int stayopen);

void
endhostent(void);

GETPROTOENT(3)

struct protoent *
getprotobyname(const char *name);

struct protoent *
getprotobynumber(int proto);

struct protoent *
getprotoent(void);

void
setprotoent(int stayopen);

void
endprotoent(void);

GETPWNAM(3)

struct passwd *
getpwnam(const char * name);

struct passwd *
getpwuid(uid_t uid);

GETPWENT(3)

struct passwd *
getpwent(void);

void
setpwent(void);

void
endpwent(void);

GETGRNAM(3)

struct group *
getgrnam(const char * name);

struct group *
getgrgid(gid_t gid);

GETGRENT(3)

struct group *
getgrent(void);

void
setgrent(void);

void
endgrent(void);

GETRPCENT(3)

struct rpcent *
getrpcbyname(const char *name);

struct rpcent *
getrpcbynumber(int number);

GETSERVENT(3)

struct servent *
getservbyname(const char *name, const char *proto);

struct servent *
getservbyport(int port, const char *proto);

struct servent *
getservent(void);

void
endservent(void);

void
setservent(int stayopen);

You can download the source (including a powerpc copy of libtivohack.a).

Back to Craig's TiVo Downloads page

Copyright © 2000, 2001, 2005
Craig Leres