summaryrefslogtreecommitdiff
path: root/calc.h
diff options
context:
space:
mode:
Diffstat (limited to 'calc.h')
-rw-r--r--calc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/calc.h b/calc.h
index ea01529..fd6f222 100644
--- a/calc.h
+++ b/calc.h
@@ -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;