March 28th, 2006
ipaddress to hostname without a single shred of error checking. This code will take an ipaddress as an argument and return the hostname associated with it using gethostbyaddr. It should have more error checking and a lot of other stuff, but this is just to show the base code. Cut and paste away.
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
int main(int argc, char **argv) {
struct hostent *hostname = malloc(sizeof(struct hostent));
extern int h_errno;
struct in_addr *ipaddr = malloc(sizeof(struct in_addr));
ipaddr->s_addr=inet_addr(argv[1]) ;
if ( (hostname = gethostbyaddr((char *) ipaddr,sizeof(ipaddr),AF_INET)) == NULL ) {
printf ("%s\n","unknown");
exit(1);
}
printf ("%s\n",hostname -> h_name);
}
Posted in Code | 1 Comment »
March 10th, 2006
Recently some laptops in our network stopped downloading virus definitions. Our firewall was configured to allow traffic from the wireless vlan to our server
Read the rest of this entry »
Posted in Windows | 5 Comments »
March 7th, 2006
There is an excellent package for working with an iPod on Linux.
gtkpod. Since version 0.99.2 it supports importing of
Video’s
Read the rest of this entry »
Posted in Linux, iPod | 2 Comments »
March 7th, 2006
My co-worker just got an iPod so I thought I would try and encode a DVD onto it (an unencrypted DVD that I own, for backup purposes only, not to be used for public performances, etc, only I looked at it, I shut it off when someone looked over my shoulder…blah blah). The ffmpeg that comes stock on RHEL4 is insufficient to do the transcoding. I built a newer version and mucked around a bit and got this going. I have a simple wrapper (there are numerous versions of such scripts floating around).
Read the rest of this entry »
Posted in Linux, iPod | 2 Comments »
March 6th, 2006

I purchased a
Proxima DPP6850 off ebay.
Because the projector is a few years old, it doesn’t have any component video capability. It has composite, s-video and two rgbvh (VGA) inputs.
Read the rest of this entry »
Posted in Geek | No Comments »
March 6th, 2006
The Internet Control Message Protocol (ICMP) has many messages that
are identified by a “type” field. I use the types to specify what actions to take in my custom iptables config.
Read the rest of this entry »
Posted in Geek | No Comments »
March 5th, 2006
Digital AV Out

To watch Gamecube games in progressive scan, you need to have a gamecube with digital out. Since 2004, Nintendo took the digital port off the gamecube. You can get your gamecube replaced with a model with the port directly from
Nintendo.
Read the rest of this entry »
Posted in Geek | 8 Comments »