diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/smb.h | 8 | ||||
-rw-r--r-- | source3/include/smb_macros.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 27c966914f..955a7cfa74 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1618,4 +1618,12 @@ typedef struct { #include "popt_common.h" +#define PORT_NONE 0 + +/* used by the IP comparison function */ +struct ip_service { + struct in_addr ip; + unsigned port; +}; + #endif /* _SMB_H */ diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index aae3b46f7a..7fcf872b60 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -202,6 +202,7 @@ true if two IP addresses are equal ****************************************************************************/ #define ip_equal(ip1,ip2) ((ip1).s_addr == (ip2).s_addr) +#define ip_service_equal(ip1,ip2) ( ((ip1).ip.s_addr == (ip2).ip.s_addr) && ((ip1).port == (ip2).port) ) /***************************************************************** splits out the last subkey of a key |