1 /* akgviz.c - AKB GraphViz dumper 2 * 3 * Copyright (c) 2006,2012 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved. 4 * This is unpublished proprietary source code. All dissemination 5 * prohibited. Contains trade secrets. NO WARRANTY. See file COPYING. 6 * Special grant: akgviz.h may be used with zxid open source project under 7 * same licensing terms as zxid itself. 8 * 9 * Dump session and PDU datastructures to a gviz (dot) graph. 10 * To visualize the graph you must have graphviz as well as 11 * ghostscript installed. 12 * 13 * See also: http://www.research.att.com/sw/tools/graphviz/download.html 14 * /apps/graphviz/std/bin/dot -Tps <a.dot |gv 15 */ 16 17 #include <string.h> 18 #include <pthread.h> 19 #include <stdarg.h> 20 #include <sys/time.h> 21 #include <stdio.h> 22 #include <stdlib.h> 23 #include <sys/types.h> 24 #include <sys/stat.h> 25 #include <sys/mman.h> 26 #include <fcntl.h> 27 #include <unistd.h> 28 #include <limits.h> 29 #include <time.h> 30 #include <sys/ptrace.h> /* see also /proc/pid */ 31 #include <bfd.h> /* -lbfd */ 32 33 #include "errmac.h" 34 #include "akbox.h" 35 36 void die(char* why); 37 char* amap(char* x); 38 39 /* Called by: */ ak_gviz(char * filename)40void ak_gviz(char* filename) 41 { 42 FILE* dot = fopen(filename, "w"); 43 if (!dot) die(filename); 44 45 fclose(dot); 46 } 47 48 /* EOF - akgviz.c */ 49