bitwise subnetscanning?

A

Alef T Veld

Hello,

i want to make a scanner for system management purposes. what is the
best way to do this. should i just do it in decimal or would working with
bits be faster/better? and how would one accomplish this?

examples for both would be appreciated
or should i be using hex?

i have minor experience with bitshifting, what is the 'normal ' way to do
this? what would a scanner like nmap do f.e.?

i would want to scan ipv4 range from 0.0.0.0 to 255.255.255.255 with the
exception of reserved addresses ofcourse.
kind regards,
atv
 
T

Thomas Matthews

Alef said:
Hello,

i want to make a scanner for system management purposes.
1. Be proud of yourself. Capitalize 'I' when referring to yourself.
2. What does it scan?
3. Define "system management purposes".

what is the best way to do this.
1. Questions end in a "?".
2. Can't help you unless you present some detailed requirements.
Remember, there are people that can't read your mind.

should i just do it in decimal or would working with
bits be faster/better?
1. In general, sentences start with a capital (uppercase) character.
2. How is working with decimal different than working with bits?
Computers represent numbers, whether they be decimal, octal or
hexadecimal, as bits. Humans convert these bits into a
a familiar representation.

and how would one accomplish this?
1. By first coming up with a detailed set of requirements.
2. Generally, designing is the next step.
3. Some people would say to write tests as the next step.
4. Write code to fullfill the design, and apply the tests
as you go along.
5. See and
examples for both would be appreciated
or should i be using hex?
1. Web searching utilities, like http://www.google.com,
are your friends, use them.
2. Whether you use base-36, base-3 or hex depends on the
requirements and the design. Use the system that best
communicates the data most effectively.

i have minor experience with bitshifting, what is the 'normal ' way to do
this?
1. The normal way to bitshift is to use the bit shifting
operators "<<" and ">>".
Example: x = y << 2;
2. The other method is to use multiplication or division by
powers of two. Hopefully, the compiler will convert this
expression into shifting.
Example: y = x / 8;

what would a scanner like nmap do f.e.?
Sorry, but I'm not familiar with nmap. Is it in the
C language specification?

i would want to scan ipv4 range from 0.0.0.0 to 255.255.255.255 with the
exception of reserved addresses ofcourse.
kind regards,
atv
Your best source of information would be a newsgroup that
discusses networking.


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
D

Dingo

Thomas Matthews said:
1. Questions end in a "?".

Questions end with a question mark -- not in one.

2. Can't help you unless you present some detailed requirements.
Remember, there are people that can't read your mind.

Who can't help? Aliens can't help? The Los Angeles Dodgers can't
help? There is peril in writing a sentence without a subject.
Remember, there are people that can't read your mind.

1. In general, sentences start with a capital (uppercase) character.
2. How is working with decimal different than working with bits?
Computers represent numbers, whether they be decimal, octal or
hexadecimal, as bits. Humans convert these bits into a
a familiar representation.

When constrasting two items, the phrase "different from" is
appropriate. Using commas to offset a non-restrictive expression
which itself contains commas can cause confusion. Dashes often
work better in such situations.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top