<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2713.1100" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=511375721-14032002>im having difficulty
getting my ip from within a winsock program. this is mainly due to my
inability to understand this:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=511375721-14032002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=511375721-14032002>
type<BR> hostent =
record<BR> { official name
of host }<BR>
h_name: pchar;<BR> { alias
list }<BR>
h_aliases: ^pchar;<BR> {
host address type
}<BR> h_addrtype:
SmallInt;<BR> { length of
address }<BR>
h_length: SmallInt;<BR> {
list of addresses
}<BR> case byte
of<BR>
0: (h_addr_list:
^pchar);<BR>
1: (h_addr: ^pchar)<BR>
end;<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=511375721-14032002>how do i understand
the case statement? what does 'case byte of' refer to? in all the c
examples i have read, they indicate that h_addr_list should contain an array of
addresses for the host, i.e. me. however, the length of this list is
always 4 bytes, which is only one address, and it's always the same as h_addr,
both pointing to the loopback address. the c examples all use h_addr_list
as an array. why isn't this an array here? im seriously
confused.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=511375721-14032002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=511375721-14032002>can anybody help me
out? i need to know my modem's ip address so that i can instruct other
people to connect to that address. its kind of a pain to always have to
run ipconfig. my users won't like that, and i shouldn't have to teach them
to do that if i can just divine the address within my
program.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=511375721-14032002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=511375721-14032002>regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=511375721-14032002>ron
wilson</DIV></SPAN></FONT></BODY></HTML>