UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
August
Su M Tu W Th F Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Sponsored Links
Latest Postings
Amazon Gift Card Generator/KeyGen?te
by Gecko666
Yesterday at 05:21 PM
Latest Reviews
Page 2 of 2 < 1 2
Topic Options
Rate This Topic
#7243 - 07/22/02 05:54 PM Re: Ports
Scallion Offline
Junior Member

Registered: 03/04/02
Posts: 48
Loc: iraq
I think my comment related two things of interest to me:

1. I am unsure of how many ports are on a system (Although this has changed; you have now informed me!)
2. Did the developers of whatever system you're using use an int or an unsigned int or a different datatype.

I never claimed there's only 32676 ports I expressed my lack of knowledge concerning the total number of ports on a system and provided a possible number that might be there, lol.

Top
Sponsored Links
      
#7244 - 07/22/02 06:20 PM Re: Ports
ninjaneo Offline
UGN Security Staff

Registered: 03/06/02
Posts: 256
Loc: CA, USA
jebus christ, Scallion you dont have to be so elite hehehe. SR: I think you have competition

this was just to comment on how l33t Scallion's post was

Top
#7245 - 07/22/02 06:35 PM Re: Ports
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
"2. Did the developers of whatever system you're using use an int or an unsigned int or a different datatype."

signed or unsigned is irrelevent to my point. You said:

"32676 is the limit on an int, but a unsigned int (this is for C datatypes) would run up to 65000+"

This would be true on a 16 bit system. For a 32-bit system I'd rewrite it like this:

"2147483648 is the limit on an int, but a unsigned int (this is for C datatypes) would run up to 4294967295"

A lot of long-time programmers think that int is only 2 bytes. Lots of people make that mistake. But now in the days of 32-bit systems, it's 4. Just letting you know. I'm 100% sure on this.

Here, I'll diagram it again like this for ya - just trying to express myself in a way that is easily understood:

unsigned int on a 16-bit system
0 to 65535

signed int on a 16-bit system
-32768 to 32767

unsigned int on a 32-bit system
0 to 4294967295

signed int on a 32-bit system
-2147483648 to 2147483647

---

Now, for proof, write a small C program. Output the return value of 'sizeof(int)' and you'll get 4 on 32-bit systems, and 2 on 16-bit systems.
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#7246 - 07/22/02 07:56 PM Re: Ports
Scallion Offline
Junior Member

Registered: 03/04/02
Posts: 48
Loc: iraq
SR, dude, you're freakin' out!

As to whether something is signed or unsigned has to do a lot with the maximum value that can be assigned to that variable.

The first bit of a signed int is a 1 or a 0 (duh, bit!) that determines what the sign of the value is. This takes 1 bit away from the overall size of the int - hence, if we count up our powers of two, then we'll realize that for every bit that is lost, the total value a int can hold is decreased by a power of 2.

I totally understand your 16-bit and 32-bit explanations (NEWS FLASH: contrary to public belief, no, i am not a total idiot! lol) and I'll even bet I could find out what it would be for a 64-bit system too!

And...um, I know C too, I can write a quick program. Thanks. Yep. C++ too, i'm leet out the wazoo. NONO, i'm not "elite", only lamers can be "elite".

Top
#7247 - 07/22/02 09:33 PM Re: Ports
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
heh, nah, I'm not freakin out. When my point isn't coming across properly, I get very verbose. I was just trying to tell you about var sizes, and you think I'm talking about max values. Two subtly different things. The conflict probably arose cause you look at var types in terms of value, and I look at them in terms of size. When considering a var's size, sign is irrelevent - that's my point.

I just felt compelled to tell ya that int is actually 32-bit and why cause you said it was 16-bit so-to-speak.

(you don't have to prove that you're not an idiot by proving you know how negative numbers is translated from binary. )
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#7248 - 07/22/02 10:17 PM Re: Ports
dashocker Offline
Member

Registered: 03/05/02
Posts: 524
Loc: Cornfields everywhere...
hmm, good point, i forgot to mention programs must be listening on ports. guess it was just implied.

Top
#7249 - 07/23/02 05:44 PM Re: Ports
Scallion Offline
Junior Member

Registered: 03/04/02
Posts: 48
Loc: iraq
Ok. Max values vs. var sizes understood.

Hurrah...someone valued my comment that you have to put a listener on ports...

Top
#7250 - 07/23/02 10:44 PM Re: Ports
dashocker Offline
Member

Registered: 03/05/02
Posts: 524
Loc: Cornfields everywhere...
yeah, ur j33t

Top
Page 2 of 2 < 1 2

Moderator:  Infinite 
Featured Member
Registered: 08/21/13
Posts: 1
Forum Stats
2148 Members
46 Forums
33889 Topics
69056 Posts

Max Online: 1567 @ 04/25/10 10:20 AM
Top Posters
UGN Security 27051
Gremelin 7192
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Gecko666, defghi795767, Devo60, ali, lavos
2147 Registered Users
Who's Online
1 registered (Tim050), 190 Guests and 265 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!