diff options
| author | batleram <batleram@gmail.com> | 2026-10-24 17:28:26 -0400 |
|---|---|---|
| committer | batleram <batleram@gmail.com> | 2026-10-24 17:28:26 -0400 |
| commit | deeaf5134dcd156500436ad57ba3d6e814a21849 (patch) | |
| tree | c69425a8915ec9d783d1db5201734866db1cb2b9 /calc.h | |
| parent | a38f91aff987f01cc885771554b4cd142599df3f (diff) | |
Hardcode templating ~800ms
Diffstat (limited to 'calc.h')
| -rw-r--r-- | calc.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2,10 +2,13 @@ #define UINT_TO_SEGMENTS(i) (i>>24 & 0xff),(i>>16 & 0xff),(i>>8 & 0xff),(i & 0xff) +#define WRITE_STR(ptr, str, len) for (int i=0; i<len; i++){ptr[0]=str[i]; ptr++;} + int print_usage(); uint32_t calc_netmask(unsigned int cidr); uint32_t segments_to_ip(unsigned int segments[4]); uint32_t cidr_for_netspace(unsigned int desired_netspace); +void write_ip(char **chunk_ptr, uint32_t ip); typedef struct { uint32_t network; |
