well I have solved the initialization problem in the following way.
if(v==0)
{
flow[0].sr=new_flow.sr;
flow[0].ds=new_flow.ds;
v++;
}
where v is another integer initialized with 0;
Type: Posts; User: Rishi.
well I have solved the initialization problem in the following way.
if(v==0)
{
flow[0].sr=new_flow.sr;
flow[0].ds=new_flow.ds;
v++;
}
where v is another integer initialized with 0;
Thanks roan you helped me a lot I have solved the problem cheers!
well now m encountering another problem and that is with comparing is it so that I cant compare two struct values.
while(i<=j)...
Sorry to tell you sir, But I guess you dint read the whole thing, My question was
how to Initialize a structure can I use
flows flow[1000] = new_flow;
and m really sorry to bother you by...
Hi now there is another problem Could someone please tell me how to initialize a structure array like
flows flow[1000] = new_flow; Cant I initialize it like this? Or if there is some other method do...
Heyy Thanks a lot you really helped me many a thanks.
and I am getting this error
readpacket.c:60: error: invalid operands to binary == (have ‘flows’ and ‘flows’)
and its occurring at
while(i<=sizeof(flow))
{
if(new_flow == flow[i])
#include<libtrace.h>
#include<stdio.h>
#include<inttypes.h>
#include<arpa/inet.h>
#include<netinet/tcp.h>
uint64_t count = 0;
typedef struct {
Hello thanks for replying.
I have already tried this in the following way:
inet_ntop(AF_INET, &(sa_i->sin_addr), new_flow[++i].src, INET_ADDRSTRLEN);
but it gives this error....
Hi I am new to socket Programming and C. I have done a part of my project which includes passive analysis of packets, extracting the 5 tuple values needed to compare for getting the flows and and...
The sequence no. part is:
if((*y=*t) == (*z=*(++t)))
{//printf("%d, %d,", t, ++t);
count_flow++;
}
Thanks again for replying, As I said earlier m writing a code for passive analysis of packets. I have a bundle of packets and they are in ".pcap" format. I am not trying to go through all the port...
And m comparing all these values to find out the no. of flows and then distinguish them for incoming flows and outgoing flows, between two addresses.
Thanks tabstop and MK27 for replying .... I really appreciate .... MK27 M sorry for using excessive words instead should have asked the way for the "toilet". Well, I have got all the values needed...
sa = trace_get_source_address(packet, &addr);
printf("packet is type %d af_inet=%d\n", sa->sa_family, AF_INET);
if (sa->sa_family == AF_INET) {
/* ipv4 packet */
struct sockaddr_in *sa_in...
Would you please elucidate that ..... what exactly do you mean to say .....??
Hi I am Rishi studying in Loughborough University UK, I have got a project to do where I have to use libtrace library to get the standard 5 tuple values(Source and Destination Address, Source and...