shithub: netgraph

ref: 59402bf42b8b199218f1f0d111aaf273a3c1806a
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;