difference between sock->sport and sock->num

difference between sock->sport and sock->num

Post by Marek Zawadzk » Thu, 14 Mar 2002 05:50:51



Hello,

What is a difference between the 2 following?
include/net/sock.h :

struct sock{
[...]

unsigned short          num;            /* Local port  */
__u16                   sport;          /* Source port */

[..]

Quote:}

Thanks,

-marek

 
 
 

difference between sock->sport and sock->num

Post by Laudney R » Fri, 15 Mar 2002 21:35:13


num is the port number assigned to the sock{}, which is in HBO or host byte
order. It should be converted to NBO or network byte order using htons().
The result is stored in sport.

-- Laudney
Admin of open source project: T/TCP for Linux
at http://ttcplinux.sourceforge.net
or http://ttcplinux.tripod.com


> Hello,

> What is a difference between the 2 following?
> include/net/sock.h :

> struct sock{
> [...]

> unsigned short          num;            /* Local port  */
> __u16                   sport;          /* Source port */

> [..]
> }

> Thanks,

> -marek


 
 
 

1. Win95 -> Linux & socks -> Internet !?

Hi,

perhaps someone is able to help me to get thinks 100% working.

I have a windows95 pc which is connected to a linux pc via ethernet.
The linux pc is connected to the internet via ppp and a modem. ppp
works, I can use ftp, telnet, etc.

I wanted to use Netscape on my windows pc, so I installed socks on
the linux pc. I can use Netscape (proxy is my linux pc) but I can
only connect to any www-server if I use the ip-adress. It seems
that I can't reach any dns-server. Why?

The socks-package was configured (dns-server) and than compiled.
The linux-pc and the windows-pc have a class-c ip-adress and
ppp uses dynamic ip. I think there might be a problem. Right?

Any hints? What about not using socks and some other proxy? Is
there an alternative available?

--
   \ Martin Imbeck                 /     phone +49-40-874436    /  

     \                           /      Hamburg / Germany     /    
      \________________________ /____________________________/

2. Apache Ant 1.5.2 in ports

3. creating MP3 files using cdda2wav->sox->encode

4. OpenGL on Linux

5. Please, how to Privoxy -> tor -> other socks ?

6. How to display the message in color ?

7. oops during sock->ops->connect in ipv6

8. Bash and Openwindows

9. ===>>> HITNO - KOMPONENTE NA PRODAJU ZA 80 DEM <<<===

10. ===>>> HITNO - KOMPONENTE NA PRODAJU ZA 80 DEM <<<===....

11. ===>>> HITNO - KOMPONENTE NA PRODAJU ZA 80 DEM <<<===.

12. ===>>> HITNO - KOMPONENTE NA PRODAJU ZA 80 DEM <<<===..

13. <><><> MOUNTING EXTENDED PARTITION <><><>