diff --git a/Netch/3rd/NFSDK2/nfapinet.cs b/Netch/3rd/NFSDK2/nfapinet.cs
index 4d7e0db87b..b19e1639d5 100644
--- a/Netch/3rd/NFSDK2/nfapinet.cs
+++ b/Netch/3rd/NFSDK2/nfapinet.cs
@@ -499,7 +499,7 @@ public class NFAPI
* @param driverName The name of hooking driver, without ".sys" extension.
* @param pHandler Pointer to event handling object
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_init(String driverName, IntPtr pHandler);
public static NF_STATUS nf_init(String driverName, NF_EventHandler pHandler)
@@ -537,21 +537,21 @@ public static NF_STATUS nf_init(String driverName, NF_EventHandler pHandler)
* Stops the filtering thread, breaks all filtered connections and closes
* a connection with the hooking driver.
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern void nf_free();
/**
* Registers and starts a driver with specified name (without ".sys" extension)
* @param driverName
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_registerDriver(String driverName);
/**
* Unregisters a driver with specified name (without ".sys" extension)
* @param driverName
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_unRegisterDriver(String driverName);
@@ -564,7 +564,7 @@ public static NF_STATUS nf_init(String driverName, NF_EventHandler pHandler)
* @param id Connection identifier
* @param suspended true for suspend, false for resume
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_tcpSetConnectionState(ulong id, int suspended);
/**
@@ -573,7 +573,7 @@ public static NF_STATUS nf_init(String driverName, NF_EventHandler pHandler)
* @param buf Pointer to data buffer
* @param len Buffer length
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_tcpPostSend(ulong id, IntPtr buf, int len);
/**
@@ -582,14 +582,14 @@ public static NF_STATUS nf_init(String driverName, NF_EventHandler pHandler)
* @param buf Pointer to data buffer
* @param len Buffer length
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_tcpPostReceive(ulong id, IntPtr buf, int len);
/**
* Breaks the connection with given id.
* @param id Connection identifier
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_tcpClose(ulong id);
//
@@ -601,7 +601,7 @@ public static NF_STATUS nf_init(String driverName, NF_EventHandler pHandler)
* @param id Socket identifier
* @param suspended true for suspend, false for resume
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_udpSetConnectionState(ulong id, int suspended);
/**
@@ -611,7 +611,7 @@ public static NF_STATUS nf_init(String driverName, NF_EventHandler pHandler)
* @param buf Pointer to data buffer
* @param len Buffer length
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_udpPostSend(ulong id,
IntPtr remoteAddress,
IntPtr buf, int len,
@@ -624,7 +624,7 @@ public static extern NF_STATUS nf_udpPostSend(ulong id,
* @param buf Pointer to data buffer
* @param len Buffer length
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_udpPostReceive(ulong id,
IntPtr remoteAddress,
IntPtr buf, int len,
@@ -636,7 +636,7 @@ public static extern NF_STATUS nf_udpPostReceive(ulong id,
* @param len Buffer length
* @param options IP options
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_ipPostReceive(
IntPtr buf, int len,
ref NF_IP_PACKET_OPTIONS options);
@@ -647,7 +647,7 @@ public static extern NF_STATUS nf_ipPostReceive(
* @param len Buffer length
* @param options IP options
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_ipPostSend(
IntPtr buf, int len,
ref NF_IP_PACKET_OPTIONS options);
@@ -661,7 +661,7 @@ public static extern NF_STATUS nf_ipPostSend(
* @param pRule See NF_RULE
* @param toHead TRUE (1) - add rule to list head, FALSE (0) - add rule to tail
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern NF_STATUS nf_addRule(ref NF_RULE pRule, int toHead);
private static void updateAddressLength(ref byte[] buf)
@@ -694,7 +694,7 @@ public static NF_STATUS nf_addRule(NF_RULE pRule, int toHead)
* @param pRule See NF_RULE
* @param toHead TRUE (1) - add rule to list head, FALSE (0) - add rule to tail
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern NF_STATUS nf_addRuleEx(ref NF_RULE_EX pRule, int toHead);
public static NF_STATUS nf_addRuleEx(NF_RULE_EX pRule, int toHead)
@@ -712,7 +712,7 @@ public static NF_STATUS nf_addRuleEx(NF_RULE_EX pRule, int toHead)
* @param pRules Array of NF_RULE structures
* @param count Number of items in array
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern NF_STATUS nf_setRules(IntPtr pRules, int count);
public static NF_STATUS nf_setRules(NF_RULE[] rules)
@@ -744,7 +744,7 @@ public static NF_STATUS nf_setRules(NF_RULE[] rules)
* @param pRules Array of NF_RULE structures
* @param count Number of items in array
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern NF_STATUS nf_setRulesEx(IntPtr pRules, int count);
public static NF_STATUS nf_setRulesEx(NF_RULE_EX[] rules)
@@ -774,34 +774,34 @@ public static NF_STATUS nf_setRulesEx(NF_RULE_EX[] rules)
/**
* Removes all rules from driver.
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_deleteRules();
/**
* Sets the timeout for TCP connections and returns old timeout.
* @param timeout Timeout value in milliseconds. Specify zero value to disable timeouts.
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern UInt32 nf_setTCPTimeout(UInt32 timeout);
/**
* Disables indicating TCP packets to user mode for the specified endpoint
* @param id Socket identifier
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_tcpDisableFiltering(ulong id);
/**
* Disables indicating UDP packets to user mode for the specified endpoint
* @param id Socket identifier
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_udpDisableFiltering(ulong id);
/**
* Returns TRUE if the specified process acts as a local proxy, accepting the redirected TCP connections.
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern bool nf_tcpIsProxy(uint processId);
/**
@@ -811,37 +811,37 @@ public static NF_STATUS nf_setRulesEx(NF_RULE_EX[] rules)
* @param nThreads Number of worker threads for NF_EventHandler events
* @param flags A combination of flags from NF_FLAGS
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern void nf_setOptions(uint nThreads, uint flags);
/**
* Complete TCP connect request pended using flag NF_PEND_CONNECT_REQUEST.
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_completeTCPConnectRequest(ulong id, ref NF_TCP_CONN_INFO pConnInfo);
/**
* Complete UDP connect request pended using flag NF_PEND_CONNECT_REQUEST.
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_completeUDPConnectRequest(ulong id, ref NF_UDP_CONN_REQUEST pConnInfo);
/**
* Returns in pConnInfo the properties of TCP connection with specified id.
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_getTCPConnInfo(ulong id, ref NF_TCP_CONN_INFO pConnInfo);
/**
* Returns in pConnInfo the properties of UDP socket with specified id.
**/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_getUDPConnInfo(ulong id, ref NF_UDP_CONN_INFO pConnInfo);
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern bool nf_getProcessNameW(uint processId, IntPtr buf, int len);
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern bool nf_getProcessNameFromKernel(uint processId, IntPtr buf, int len);
/**
@@ -880,13 +880,13 @@ public static unsafe String nf_getProcessName(UInt32 processId)
return "System";
}
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern void nf_adjustProcessPriviledges();
/*
* Set the event handler for IP filtering events
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern void nf_setIPEventHandler(IntPtr pHandler);
/*
@@ -910,51 +910,51 @@ public static void nf_setIPEventHandler(NF_IPEventHandler pHandler)
/**
* Add flow control context
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_addFlowCtl(ref NF_FLOWCTL_DATA pData, ref UInt32 pFcHandle);
/**
* Delete flow control context
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_deleteFlowCtl(UInt32 fcHandle);
/**
* Associate flow control context with TCP connection
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_setTCPFlowCtl(ulong id, UInt32 fcHandle);
/**
* Associate flow control context with UDP socket
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_setUDPFlowCtl(ulong id, UInt32 fcHandle);
/**
* Modify flow control context limits
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_modifyFlowCtl(UInt32 fcHandle, ref NF_FLOWCTL_DATA pData);
/**
* Get flow control context statistics as the numbers of in/out bytes
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_getFlowCtlStat(UInt32 fcHandle, ref NF_FLOWCTL_STAT pStat);
/**
* Get TCP connection statistics as the numbers of in/out bytes.
* The function can be called only from tcpClosed handler!
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_getTCPStat(ulong id, ref NF_FLOWCTL_STAT pStat);
/**
* Get UDP socket statistics as the numbers of in/out bytes.
* The function can be called only from udpClosed handler!
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_getUDPStat(ulong id, ref NF_FLOWCTL_STAT pStat);
public enum NF_SOCKET_OPTIONS
@@ -967,10 +967,10 @@ public enum NF_SOCKET_OPTIONS
TCP_SOCKET_WINDOW = 6
}
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_tcpSetSockOpt(ulong id, NF_SOCKET_OPTIONS optname, ref int optval, int optlen);
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS nf_tcpSetSockOpt(ulong id, NF_SOCKET_OPTIONS optname, IntPtr optval, int optlen);
public static NF_STATUS nf_tcpSetSockOpt(ulong id, NF_SOCKET_OPTIONS optname, bool optval)
@@ -982,7 +982,7 @@ public static NF_STATUS nf_tcpSetSockOpt(ulong id, NF_SOCKET_OPTIONS optname, bo
/**
* Add binding rule to driver
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
private static extern NF_STATUS
nf_addBindingRule(ref NF_BINDING_RULE pRule, int toHead);
@@ -999,14 +999,14 @@ public static NF_STATUS
/**
* Delete all binding rules from driver
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern NF_STATUS
nf_deleteBindingRules();
/**
* Returns the type of attached driver (DT_WFP, DT_TDI or DT_UNKNOWN)
*/
- [DllImport("nfapinet", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("bin\\nfapinet", CallingConvention = CallingConvention.Cdecl)]
public static extern UInt32
nf_getDriverType();
};