Article View: csu.unix.linux
Article #169Re: hostname
From: Michael Dwyer
Date: Thu, 24 Feb 2000 00:00
Date: Thu, 24 Feb 2000 00:00
28 lines
2032 bytes
2032 bytes
Xylen <mctupper@holly.colostate.edu> wrote: : When I set up my Redhat 6.0, I entered my IP addy as xxx.xxx.xxx.037 : Note the '7' on the end. After installation was complete, my computer The problem is the leading 0. I chewed out the housing department about this once, something like two or three years ago... But they don't listen to me. Maybe cuz I rant too much. :) To be jaunty, and because I was annoyed at Housing Networks already, I thought I'd be jaunty and type in the IP address EXACTLY as it was typed on the little form. I got the same effect you saw. Anyway, the scanf thingy in C will consider any number starting with a 0 to be in octal. Sooo, 037 is octal comes out to... something else in decimal. If you wanted to be especially jaunty, you could convert it to hex, and put 0x in front of the numbers... Alternatly, you can also convert the whole 4x8 ip string into a 32bit word. Check out samspade.[org|com|???] for more stupid tricks... The odd thing is that my IP address was .037 when I was in the halls, too.... Coincidence? Nah. Prolly not. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Michael J. Dwyer I doubt, therefore I might be. mdwyer@holly.ColoState.edu http://WWW.CS.ColoState.EDU/~dwyer/ Computer Science Major Amateur Radio Tech N0ZAP
Technical Details
Message-ID:
<38b57ff1@news.ColoState.EDU>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38B30904.E38B7073@holly.colostate.edu> <slrn8b6oc3.3es.mike@localhost.localdomain> <38B36A77.3F1ED47B@holly.ColoState.EDU> <38b48bb7@news.ColoState.EDU> <38B493AC.F19B2FE6@holly.colostate.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1159f7,4f529aa91ef19476
X-Google-Attributes: gid1159f7,public
From: Michael Dwyer <mdwyer@holly.ColoState.EDU>
Subject: Re: hostname
Date: 2000/02/24
Message-ID: <38b57ff1@news.ColoState.EDU>
X-Deja-AN: 589423900
References: <38B30904.E38B7073@holly.colostate.edu> <slrn8b6oc3.3es.mike@localhost.localdomain> <38B36A77.3F1ED47B@holly.ColoState.EDU> <38b48bb7@news.ColoState.EDU> <38B493AC.F19B2FE6@holly.colostate.edu>
X-Trace: 24 Feb 2000 12:01:05 -0700, holly.acns.colostate.edu
User-Agent: tin/pre-1.4-19990517 ("Psychonaut") (UNIX) (AIX/4-3)
Newsgroups: csu.unix.linux