VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



IP Tools 1.0 Basic IP thingy take a look

by Emperor Frollard (3 Submissions)
Category: Complete Applications
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

This code, aside from being totally useless is a learning tool. I wrote it for my IT intro to networking class, to illustrate the process of 'anding' (no, thats not a typo) a TCP/IP IP with its subnet mask to determine the Network ID and Network Class. Its got lots of 'dumb user' pitfall watches like checking for people typing words in number feilds etc. Also 'included' in this miracle program is the ability to use "." to tab between fields, in a custom built taborder.
In order to keep proper coding standards, I ended up with LOTS of subs, each only operating on very small tasks, to keep the code simple.
Take a look, you may like it, you may not, its totally useless (unless you need to learn about network ID's), but a good example of good coding standards, if nothing else.
How it works:
Short and sweet - to determine what network your computer is on, it uses a network ID, derrived from your IP and your subnet mask.
To put the two together, you first convert each octet (part of the IP and Mask) into binary seperately.
Then, one by one you go through bit 1 of octet 1 of each the IP and Mask, and use an 'or' on them, if either is a 1, then the resulting bit will be 1.
After all the bits have been anded, then they get converted back into decimal, resulting in the Network ID. if you didnt understand that, dont worry, I wrote this program BECAUSE my classmates didnt understand it.
feel free to vote, although (obviously) not nessecary. I just want to get a scope of what people think of it.

Inputs
A valid network IP and a subnet mask.
Assumes
Short and sweet - to determine what network your computer is on, it uses a network ID, derrived from your IP and your subnet mask. To put the two together, you first convert each octet (part of the IP and Mask) into binary seperately. Then, one by one you go through bit 1 of octet 1 of each the IP and Mask, and use an 'or' on them, if either is a 1, then the resulting bit will be 1. After all the bits have been anded, then they get converted back into decimal, resulting in the Network ID. if you didnt understand that, dont worry, I wrote this program BECAUSE my classmates didnt understand it.
Code Returns
The network ID resulting from anding the inputs, in decimal and binary.
API Declarations
none

Rate IP Tools 1.0 Basic IP thingy take a look

Download IP Tools 1.0 Basic IP thingy take a look

Download IP Tools 1.0 Basic IP thingy take a look (48 KB)

IP Tools 1.0 Basic IP thingy take a look Comments

No comments have been posted about IP Tools 1.0 Basic IP thingy take a look. Why not be the first to post a comment about IP Tools 1.0 Basic IP thingy take a look.

Post your comment

Subject:
Message:
0/1000 characters