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