Question: Write the C code using the guidelines and the snort.c and lab 5 . c guidelines. Verify the combinations given in the directions work. Snort.C:

Write the C code using the guidelines and the snort.c and lab5.c guidelines. Verify the combinations given in the directions work.
Snort.C:
#include
#include
#include
#include
#include
#define DEST_POS 0
#define SRC_POS 1
#define DEST_IP_MIN 2189413888
#define DEST_IP_MAX 2189414143
#define SRC_IP_MIN 16777216
#define SRC_IP_MAX 3758096383
#define NUMBER_PORTS 65536
#define NUMLTRS 8
struct Record {
int seqnum;
float threat;
unsigned int addrs[2];
unsigned short int ports[2];
char dns_name[NUMLTRS];
};
/* builds a random permutation of the numbers 1 through n.
* Use Knuth shuffle to create the random permutation.
*
* This function is complete and should not be changed.
*
* Output: a malloced array of ints
* the user must free the array
*/
int *build_random(int nodes)
{
int *narray;
int i, key, temp;
narray =(int *) malloc(nodes*sizeof(int));
for (i =0; i
Write the C code using the guidelines and the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!