0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _CIFS_SWN_H
0009 #define _CIFS_SWN_H
0010 #include "cifsglob.h"
0011
0012 struct cifs_tcon;
0013 struct sk_buff;
0014 struct genl_info;
0015
0016 #ifdef CONFIG_CIFS_SWN_UPCALL
0017 extern int cifs_swn_register(struct cifs_tcon *tcon);
0018
0019 extern int cifs_swn_unregister(struct cifs_tcon *tcon);
0020
0021 extern int cifs_swn_notify(struct sk_buff *skb, struct genl_info *info);
0022
0023 extern void cifs_swn_dump(struct seq_file *m);
0024
0025 extern void cifs_swn_check(void);
0026
0027 static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server)
0028 {
0029 if (server->use_swn_dstaddr) {
0030 server->dstaddr = server->swn_dstaddr;
0031 return true;
0032 }
0033 return false;
0034 }
0035
0036 static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server)
0037 {
0038 server->use_swn_dstaddr = false;
0039 }
0040
0041 #else
0042
0043 static inline int cifs_swn_register(struct cifs_tcon *tcon) { return 0; }
0044 static inline int cifs_swn_unregister(struct cifs_tcon *tcon) { return 0; }
0045 static inline int cifs_swn_notify(struct sk_buff *s, struct genl_info *i) { return 0; }
0046 static inline void cifs_swn_dump(struct seq_file *m) {}
0047 static inline void cifs_swn_check(void) {}
0048 static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server) { return false; }
0049 static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server) {}
0050
0051 #endif
0052 #endif