forked from robertdavidgraham/masscan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3216fe8
commit c5f5d33
Showing
17 changed files
with
2,055 additions
and
2,050 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#ifndef EVENT_TIMEOUT_H | ||
#define EVENT_TIMEOUT_H | ||
#include <stdint.h> | ||
|
||
struct Timeouts; | ||
struct TimeoutEntry; | ||
|
||
struct TimeoutEvent { | ||
void *p; | ||
unsigned counter; | ||
}; | ||
|
||
|
||
#ifndef EVENT_TIMEOUT_H | ||
#define EVENT_TIMEOUT_H | ||
#include <stdint.h> | ||
|
||
struct Timeouts; | ||
struct TimeoutEntry; | ||
|
||
struct TimeoutEvent { | ||
void *p; | ||
unsigned counter; | ||
}; | ||
|
||
|
||
struct Timeouts *timeouts_create(uint64_t timestamp); | ||
unsigned *timeouts_add(struct Timeouts *timeouts, void *p, uint64_t timestamp, unsigned counter); | ||
struct TimeoutEvent timeouts_remove(struct Timeouts *timeouts, uint64_t timestamp); | ||
|
||
#define TICKS_FROM_SECS(secs) ((secs)*16384ULL) | ||
#define TICKS_FROM_USECS(usecs) ((usecs)/16384ULL) | ||
#define TICKS_FROM_TV(secs,usecs) (TICKS_FROM_SECS(secs)+TICKS_FROM_USECS(usecs)) | ||
#endif | ||
|
||
#define TICKS_FROM_SECS(secs) ((secs)*16384ULL) | ||
#define TICKS_FROM_USECS(usecs) ((usecs)/16384ULL) | ||
#define TICKS_FROM_TV(secs,usecs) (TICKS_FROM_SECS(secs)+TICKS_FROM_USECS(usecs)) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#ifndef PACKET_QUEUE_H | ||
#define PACKET_QUEUE_H | ||
#include "rte-ring.h" | ||
#include <limits.h> | ||
|
||
typedef struct rte_ring PACKET_QUEUE; | ||
|
||
struct PacketBuffer { | ||
size_t length; | ||
unsigned char px[2040]; | ||
}; | ||
|
||
|
||
#ifndef PACKET_QUEUE_H | ||
#define PACKET_QUEUE_H | ||
#include "rte-ring.h" | ||
#include <limits.h> | ||
|
||
typedef struct rte_ring PACKET_QUEUE; | ||
|
||
struct PacketBuffer { | ||
size_t length; | ||
unsigned char px[2040]; | ||
}; | ||
|
||
|
||
#endif |
Oops, something went wrong.