Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. /* Mode of operations */
  2. SELECTION_MODE sampling_mode;
  3. SELECTION_MODE normalization_mode;
  4.  
  5. /* Statistics */
  6. unsigned int numberPackets;
  7. unsigned int timeFirstPacket;
  8. unsigned int timeLastPacket;
  9. unsigned int packetsReceived;
  10. unsigned int packetsProcessed;
  11.  
  12. /* Pointer to action details */
  13. nas_t* next;
  14.  
  15. /* Required for linked hash list */
  16. struct hlist_node hash_list;
  17.  
  18. struct flow_action_head* fah;
  19.  
  20. fah = (struct flow_action_head*) kzalloc(sizeof(struct flow_action_head), GFP_ATOMIC);
  21.  
  22. fah->flowID = flowID;
  23. fah->sampling_mode = SMODE_COUNT_BASED;
  24. fah->normalization_mode = NMODE_TTL;
  25. fah->numberPackets = 1;
  26. fah->timeFirstPacket = 0;
  27. fah->timeLastPacket = 0;
  28. fah->packetsReceived = 0;
  29. fah->packetsProcessed = 0;
  30. fah->next = NULL;
  31.  
  32. hash_add(flow_dictionary, &fah->hash_list, flowID);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement