We typically don't handle basic C coding questions on the ntop-dev list and certainly not on ntop - this list is for user/usage questions. Read your C manual regarding printf() formats for various types of data such as unsigned and long.
-----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hermano Toscano Moura Sent: Wednesday, July 20, 2005 4:17 PM To: [email protected] Subject: [Ntop] Problem printing NetFlow Fields Hi Everybody... I have a NetFlow file called "ft-v05.2004-04-27.100000-0300"... I'm sending it to ntop like this: "flow-cat /home/hermano/gt/netflow | flow-send -dV5 0/127.0.0.1/5555" Than I go to netflowPlugin.c and put to print somethings like: printf("Source IP: %d\n", ntohl(record->srcaddr)); printf("Source Port: %d\n", ntohs(record->srcport)); printf("Destination IP: %d\n", ntohl(record->dstaddr)); printf("Destination Port: %d\n", ntohs(record->dstport)); printf("Protocol: %d\n", record->prot); And It Prints Just The Protocol and ports Correctly... I tried to make like this too: printf("Source IP: %d\n", record->srcaddr); printf("Source Port: %d\n", record->srcport); printf("Destination IP: %d\n", record->dstaddr); printf("Destination Port: %d\n", record->dstport); printf("Protocol: %d\n", record->prot); But The Same problema appeared!!! The IP numbers, for example, sometimes appears like: -1062731860, -938375595 Does Anyone here know why it is happening? How Can In take the right values to IP numbers?? Thakns in advance!!! Hermano Toscano _______________________________________________ Ntop mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop
