[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, (smbd) and (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):
sa_family = AF_INET
sa_addr[14] = 4, 5, 192, 168, 1, 24, 220, 126, 47, 204, 180, 41, 11, 192
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 started smbd in debug mode to get the above debug data
On smbclient //

More information about the samba mailing list