[Samba] sockaddr structure elements

Uravakonda Sridhar-A20881 Sridhar.Uravakonda at motorola.com
Thu May 3 06:30:18 GMT 2007


Dear All,
 
We are using samba 3.0.24 compiled for xscale on two devices:
 
We are running a smbclient and smb daemon on two different devices,
192.168.1.39 (smbd) and 192.168.1.24 (smbclient). When we establish a
smbclient connection from client -> Server, in the
smbd/server.c:open_sockets_smbd() function, we are getting sockaddr
structure values as follows (caught at debug data on smbd):
 
smbd/server.c:open_sockets_smbd():addr
sockaddr
sa_family = AF_INET
sa_addr[14] = 4, 5, 192, 168, 1, 24, 220, 126, 47, 204, 180, 41, 11, 192
 
definition:
struct sockaddr {
    sa_family_t     sa_family;          /* Address family, AF_xxx */
    char               sa_data[14];       /* 14 bytes of protocol
address */
}
 
According to the above definition, the sa_data should contain
 
 2-byte port no:, local IP, remote IP. But it doesn't seem to be so by
looking at the data.
 
Can anyone please help me to understand this data (the sa_addr data
given above) ?
 
Commands that were run:
On 192.168.1.39: started smbd in debug mode to get the above debug data
On 192.168.1.24: smbclient //192.168.1.39/share
 
Regards,
Sridhar


More information about the samba mailing list