shithub: netgraph

ref: e78b5e27f582a692b81369be4614d0a7b8eee9cb
dir: /dat.h/

View raw version
typedef struct Tuple Tuple;
typedef struct Block Block;
typedef struct Sys Sys;
typedef struct Ipnet Ipnet;
typedef struct Pos Pos;
typedef struct Conn Conn;
typedef struct Color Color;

extern char *netdir;
extern char *systuples[];
extern int nsystuples;
extern char *ipnettuples[];
extern int nipnettuples;

extern int pagewidth;
extern int pageheight;

extern int showipnet;

struct Color {
	float r;
	float g;
	float b;
};

struct Pos {
	int x;
	int y;
};

struct Tuple {
	char *key;
	char *value;
	int ipnet; /* set by ipnet */
};

struct Block {
	Tuple *tuples;
	int ntuples;
	
	Pos p;
	int width;
	int height;
};

struct Sys {
	Block;
};

struct Ipnet {
	Block;
	Color color;
};

struct Conn {
	Sys *from;
	Sys *to;
	String *types;
};

extern char *Sipnet;