🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2456

Re: How to get the configured subnet mask for this machine?

#2456
From: Mike Knoblock
Date: Wed, 12 Apr 2006 23:13
25 lines
1666 bytes
I looked; I swear!

Thanks!!


JF Jolin wrote:
> 12 Apr 2006 14:41:53 -0700, Mike Knoblock <mknoblock@gmail.com> wrote:
> 
>> Anyone know how to use WINAPI to retrieve the subnet mask for a given 
>> interface?
> 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/getadaptersinfo.asp 
> 
> 
>> I can programmatically retrieve a list of IP addresses with 
>> gethostbyname,
>> but this doesn't deal with configured subnets.
>>
>> What's behind all this is I need an application to send a subnet 
>> broadcast message
>> on startup to find other instances of itself. Running IPCONFIG from a 
>> shell is messy,
>> and I can't find anything on MSDN.
> 
> 
Technical Details
Message-ID: <443d898e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <443d7421$1@newsgroups.borland.com> <ops7w3ocouz6rw7b@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2192634693d412d8
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 12 Apr 2006 16:13:13 -0700
From: Mike Knoblock <mknoblock@gmail.com>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: How to get the configured subnet mask for this machine?
References: <443d7421$1@newsgroups.borland.com> <ops7w3ocouz6rw7b@newsgroups.borland.com>
In-Reply-To: <ops7w3ocouz6rw7b@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 4.36.224.14
Message-ID: <443d898e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1144883598 4.36.224.14 (12 Apr 2006 16:13:18 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail