hi
i try building a bandwith monitor with the report of total
connections to/from my pc so far i do a report of ip source/destination
but now i want to know the lenght of data that belong to each ip.
for example: i want to know de down/upload of each ip

i download examples of bandwith monitor but none of them have that information down/upload of each ip

any one can help me?
thanks a lot
bybruno

What object are you using for the ip information. There should be a method there to calculate the bytes used.

here is some part of the code that get the ip:

Private Declare Function GetProcessHeap Lib "kernel32" () As Long
Private Declare Function AllocateAndGetTcpExTableFromStack Lib "iphlpapi.dll" (pTcpTableEx As Any, ByVal bOrder As Long, ByVal heap As Long, ByVal zero As Long, ByVal flags As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)

''there we get the ip
CopyMemory nRemoteAddr, ByVal pTablePtr + (pDataRef + 16), 4

Public Function GetIPAddress(dwAddr As Long) As String
Dim arrIpParts(3) As Byte
CopyMemory arrIpParts(0), dwAddr, 4
GetIPAddress = CStr(arrIpParts(0)) & "." & _
CStr(arrIpParts(1)) & "." & _
CStr(arrIpParts(2)) & "." & _
CStr(arrIpParts(3))
End Function

''and the result display there
MsgBox GetIPAddress(nRemoteAddr)

now i want to know who get the down and upload information
for that ip.


can you help me?
thanks a lot
bybruno

It looks like in the CopyMemory function the ByVal is the length of the data passed from destination to source or vice versa. Check this value debug.print byVal in the function to see what it contains with different pings , and arps.

please tell me how to display the previous month

Text1.Text = MonthName(Month(DateAdd("m", -1, Date)))

Hi

I Have Some Problem In Visual Basic Code. I Have Two Dttpicker - 1) From And 2) To . There Are Three Text Box - 1) First Text Box Directly Goes To From Date (first Dtpicker) 2) Second Goes To Date(second Dtpicker) 3) Difference Between Two Date(no Of Leave). Our Validation Is When No Of Leave Exceeds 30 Days It Will Automatically Display The Message Box Displays "leave Without Pay" . Please Help Help Me.

Thanking You

Surojit

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.