Determining a user's remote port in a VFS module

David Gutierrez davegu1 at
Tue Jun 26 23:01:57 GMT 2007

There are some tools out there. Try tcpdump, netpdump or any other network 
tool. Also, for Unix, there sed to be a tool called lslk which is from the 
same person who designed the lsof.
Check both and will give you more info.

From: Constantine Vetoshev <gepardcv at>
To: samba-technical at
Subject: Determining a user's remote port in a VFS module
Date: Mon, 25 Jun 2007 21:51:54 +0000 (UTC)
MIME-Version: 1.0
Received: from ([]) by with Microsoft SMTPSVC(6.0.3790.2668); Tue, 26 
Jun 2007 15:12:00 -0700
Received: from (localhost [])by 
(Postfix) with ESMTP id F1617163B4Dfor <davegu1 at>; Tue, 26 Jun 
2007 22:11:59 +0000 (GMT)
Received: from ( [])by (Postfix) with ESMTP id 2C313162C35for 
<samba-technical at>;Tue, 26 Jun 2007 22:11:05 +0000 (GMT)
Received: from root by with local (Exim 4.43)id 
1I3JEY-00065j-Bjfor samba-technical at; Wed, 27 Jun 2007 
00:10:03 +0200
Received: from ([])by with esmtp (Gmexim 0.1 (Debian))id 1AlnuQ-0007hv-00for 
<samba-technical at>; Wed, 27 Jun 2007 00:10:02 +0200
Received: from gepardcv by with 
local(Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00for 
<samba-technical at>; Wed, 27 Jun 2007 00:10:02 +0200
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on
X-Spam-Status: No, score=0.1 required=3.8 
autolearn=no version=3.1.7
X-Original-To: samba-technical at
Delivered-To: samba-technical at
Lines: 7
X-Complaints-To: usenet at
User-Agent: Loom/3.14 (
X-Loom-IP: (Mozilla/5.0 (Windows; U; Windows NT 5.1; 
en-US;rv: Gecko/20070515 Firefox/
X-BeenThere: samba-technical at
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Discussions on Samba internals. For general questions 
pleasesubscribe to the list 
samba at"<>
<mailto:samba-technical-request at>
List-Archive: <>
List-Post: <mailto:samba-technical at>
List-Help: <mailto:samba-technical-request at>
<>,<mailto:samba-technical-request at>
Errors-To: at
Return-Path: at
X-OriginalArrivalTime: 26 Jun 2007 22:12:00.0449 (UTC) 

I need to figure out which port a user connected from in a VFS module. 
in connection_struct in smb.h, I don't see anything promising. I see the 
IP, but not the remote port. Is this information available from Samba, or do 
have to do some sketchy /proc scraping to figure this out?


Get a preview of Live Earth, the hottest event this summer - only on MSN

More information about the samba-technical mailing list