Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

subnet mask calculation source code

Status
Not open for further replies.

DrBudz

Junior Member level 3
Joined
Dec 5, 2011
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,500
Hello,

I have designed ethernet controller, and I am programming pc software to interface the controller via rs232.

In pc software I have fileds to set the IP address of the controller and subnet mask, and then write it to controller via rs 232.
I need source code for Subnet mask calculation.

When I enter IP adress in the fields, I need subnet mask to be generated automatically, just like in windows network properties settings.

When I enter IP address (for example:)

192.168.1.10

I need subnet mask to be generated automatically:

255.255.255.0

Can someone help with the IP subnet mask calculation?
Does anybody has a source code for this calculation?

Thanks!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top