lkml.org 
[lkml]   [2004]   [Nov]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 1 Nov 2004 11:39:01 +0100 (MET)
FromJan Engelhardt <>
SubjectRe: TCP port numbers
>Hi,
> I got one question about unix socket functions. I have two machines (called A
>and B). I use A to telnet B, get the root password of B. Is there any unix
>socket function I can use to get the port number of A on B. Obviously, the

The 'struct sockaddr_in' you're filling in on B's site with the call with
accept() also fills in the port number.

>port number of B is 23. I want to use a socket function implemented on B to
>get the port number of A because a TCP connection is established between them.
>  I greatly appreciate it if you help me. Thank you in advance.
>  Xue


Jan Engelhardt
-- 
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2008