From 229e1d6ab66a9e987ffe3cd4a8de7c7f874f6de1 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 27 Jan 2008 19:35:03 +0000 Subject: [PATCH] Initial revision --- Build | 16 + dejavu-10.font | 1341 +++++++++++++++++++++++++++++++++++++++++++++ dejavu-10.tex | Bin 0 -> 131170 bytes source/host.cpp | 95 ++++ source/host.h | 37 ++ source/netvis.cpp | 192 +++++++ source/netvis.h | 48 ++ source/packet.cpp | 72 +++ source/packet.h | 27 + source/vector2.h | 12 + 10 files changed, 1840 insertions(+) create mode 100644 Build create mode 100644 dejavu-10.font create mode 100644 dejavu-10.tex create mode 100644 source/host.cpp create mode 100644 source/host.h create mode 100644 source/netvis.cpp create mode 100644 source/netvis.h create mode 100644 source/packet.cpp create mode 100644 source/packet.h create mode 100644 source/vector2.h diff --git a/Build b/Build new file mode 100644 index 0000000..bb1b9a1 --- /dev/null +++ b/Build @@ -0,0 +1,16 @@ +package "netvis" +{ + require "mspcore"; + require "mspgbase"; + require "mspgl"; + + build_info + { + library "pcap"; + }; + + program "netvis" + { + source "source"; + }; +}; diff --git a/dejavu-10.font b/dejavu-10.font new file mode 100644 index 0000000..e2f7dba --- /dev/null +++ b/dejavu-10.font @@ -0,0 +1,1341 @@ +//texture "dejavu-10.png"; +default_size 10; +ascent 1.000; +descent -0.300; +glyph 32 +{ + texcoords 0.035156 0.960938 0.035156 0.960938; + size 0.000 0.000; + offset 0.000 0.000; + advance 0.300; +}; +glyph 33 +{ + texcoords 0.101562 0.960938 0.105469 0.988281; + size 0.100 0.700; + offset 0.200 0.000; + advance 0.400; +}; +glyph 34 +{ + texcoords 0.167969 0.976562 0.179688 0.988281; + size 0.300 0.300; + offset 0.100 0.400; + advance 0.500; +}; +glyph 35 +{ + texcoords 0.230469 0.960938 0.257812 0.988281; + size 0.700 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 36 +{ + texcoords 0.304688 0.957031 0.328125 0.988281; + size 0.600 0.800; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 37 +{ + texcoords 0.371094 0.960938 0.402344 0.988281; + size 0.800 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 38 +{ + texcoords 0.441406 0.960938 0.468750 0.988281; + size 0.700 0.700; + offset 0.100 0.000; + advance 0.900; +}; +glyph 39 +{ + texcoords 0.523438 0.976562 0.527344 0.988281; + size 0.100 0.300; + offset 0.100 0.400; + advance 0.300; +}; +glyph 40 +{ + texcoords 0.593750 0.957031 0.601562 0.992188; + size 0.200 0.900; + offset 0.100 -0.100; + advance 0.400; +}; +glyph 41 +{ + texcoords 0.664062 0.957031 0.671875 0.992188; + size 0.200 0.900; + offset 0.100 -0.100; + advance 0.400; +}; +glyph 42 +{ + texcoords 0.726562 0.972656 0.746094 0.988281; + size 0.500 0.400; + offset 0.000 0.300; + advance 0.500; +}; +glyph 43 +{ + texcoords 0.792969 0.960938 0.820312 0.988281; + size 0.700 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 44 +{ + texcoords 0.875000 0.957031 0.878906 0.964844; + size 0.100 0.200; + offset 0.100 -0.100; + advance 0.300; +}; +glyph 45 +{ + texcoords 0.941406 0.968750 0.953125 0.972656; + size 0.300 0.100; + offset 0.100 0.200; + advance 0.400; +}; +glyph 46 +{ + texcoords 0.031250 0.890625 0.035156 0.894531; + size 0.100 0.100; + offset 0.100 0.000; + advance 0.300; +}; +glyph 47 +{ + texcoords 0.097656 0.886719 0.109375 0.917969; + size 0.300 0.800; + offset 0.000 -0.100; + advance 0.300; +}; +glyph 48 +{ + texcoords 0.164062 0.890625 0.183594 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 49 +{ + texcoords 0.234375 0.890625 0.253906 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 50 +{ + texcoords 0.304688 0.890625 0.328125 0.917969; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 51 +{ + texcoords 0.375000 0.890625 0.394531 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 52 +{ + texcoords 0.445312 0.890625 0.464844 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 53 +{ + texcoords 0.515625 0.890625 0.535156 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 54 +{ + texcoords 0.585938 0.890625 0.605469 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 55 +{ + texcoords 0.656250 0.890625 0.675781 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 56 +{ + texcoords 0.726562 0.890625 0.746094 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 57 +{ + texcoords 0.796875 0.890625 0.816406 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 58 +{ + texcoords 0.875000 0.890625 0.878906 0.910156; + size 0.100 0.500; + offset 0.100 0.000; + advance 0.300; +}; +glyph 59 +{ + texcoords 0.945312 0.886719 0.949219 0.910156; + size 0.100 0.600; + offset 0.100 -0.100; + advance 0.300; +}; +glyph 60 +{ + texcoords 0.023438 0.824219 0.046875 0.843750; + size 0.600 0.500; + offset 0.100 0.100; + advance 0.800; +}; +glyph 61 +{ + texcoords 0.093750 0.828125 0.117188 0.839844; + size 0.600 0.300; + offset 0.100 0.200; + advance 0.800; +}; +glyph 62 +{ + texcoords 0.164062 0.824219 0.187500 0.843750; + size 0.600 0.500; + offset 0.100 0.100; + advance 0.800; +}; +glyph 63 +{ + texcoords 0.238281 0.820312 0.253906 0.847656; + size 0.400 0.700; + offset 0.100 0.000; + advance 0.500; +}; +glyph 64 +{ + texcoords 0.296875 0.812500 0.332031 0.847656; + size 0.900 0.900; + offset 0.100 -0.200; + advance 1.100; +}; +glyph 65 +{ + texcoords 0.371094 0.820312 0.398438 0.847656; + size 0.700 0.700; + offset 0.000 0.000; + advance 0.700; +}; +glyph 66 +{ + texcoords 0.445312 0.820312 0.464844 0.847656; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 67 +{ + texcoords 0.515625 0.820312 0.539062 0.847656; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 68 +{ + texcoords 0.585938 0.820312 0.609375 0.847656; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 69 +{ + texcoords 0.656250 0.820312 0.675781 0.847656; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 70 +{ + texcoords 0.730469 0.820312 0.746094 0.847656; + size 0.400 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 71 +{ + texcoords 0.796875 0.820312 0.820312 0.847656; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 72 +{ + texcoords 0.867188 0.820312 0.890625 0.847656; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 73 +{ + texcoords 0.945312 0.820312 0.949219 0.847656; + size 0.100 0.700; + offset 0.100 0.000; + advance 0.300; +}; +glyph 74 +{ + texcoords 0.027344 0.742188 0.039062 0.777344; + size 0.300 0.900; + offset -0.100 -0.200; + advance 0.300; +}; +glyph 75 +{ + texcoords 0.093750 0.750000 0.117188 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 76 +{ + texcoords 0.164062 0.750000 0.183594 0.777344; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 77 +{ + texcoords 0.230469 0.750000 0.257812 0.777344; + size 0.700 0.700; + offset 0.100 0.000; + advance 0.900; +}; +glyph 78 +{ + texcoords 0.304688 0.750000 0.328125 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 79 +{ + texcoords 0.375000 0.750000 0.398438 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 80 +{ + texcoords 0.445312 0.750000 0.464844 0.777344; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 81 +{ + texcoords 0.515625 0.746094 0.539062 0.777344; + size 0.600 0.800; + offset 0.100 -0.100; + advance 0.800; +}; +glyph 82 +{ + texcoords 0.585938 0.750000 0.609375 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 83 +{ + texcoords 0.656250 0.750000 0.679688 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 84 +{ + texcoords 0.726562 0.750000 0.746094 0.777344; + size 0.500 0.700; + offset 0.000 0.000; + advance 0.500; +}; +glyph 85 +{ + texcoords 0.796875 0.750000 0.820312 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 86 +{ + texcoords 0.859375 0.750000 0.894531 0.777344; + size 0.900 0.700; + offset -0.100 0.000; + advance 0.700; +}; +glyph 87 +{ + texcoords 0.929688 0.750000 0.964844 0.777344; + size 0.900 0.700; + offset 0.000 0.000; + advance 0.900; +}; +glyph 88 +{ + texcoords 0.023438 0.679688 0.046875 0.707031; + size 0.600 0.700; + offset 0.000 0.000; + advance 0.600; +}; +glyph 89 +{ + texcoords 0.089844 0.679688 0.117188 0.707031; + size 0.700 0.700; + offset 0.000 0.000; + advance 0.700; +}; +glyph 90 +{ + texcoords 0.164062 0.679688 0.187500 0.707031; + size 0.600 0.700; + offset 0.000 0.000; + advance 0.600; +}; +glyph 91 +{ + texcoords 0.242188 0.675781 0.250000 0.710938; + size 0.200 0.900; + offset 0.100 -0.100; + advance 0.400; +}; +glyph 92 +{ + texcoords 0.308594 0.675781 0.320312 0.707031; + size 0.300 0.800; + offset 0.000 -0.100; + advance 0.300; +}; +glyph 93 +{ + texcoords 0.382812 0.675781 0.390625 0.710938; + size 0.200 0.900; + offset 0.100 -0.100; + advance 0.400; +}; +glyph 94 +{ + texcoords 0.445312 0.695312 0.468750 0.707031; + size 0.600 0.300; + offset 0.100 0.400; + advance 0.800; +}; +glyph 95 +{ + texcoords 0.515625 0.671875 0.535156 0.675781; + size 0.500 0.100; + offset 0.000 -0.200; + advance 0.500; +}; +glyph 96 +{ + texcoords 0.593750 0.703125 0.601562 0.710938; + size 0.200 0.200; + offset 0.100 0.600; + advance 0.500; +}; +glyph 97 +{ + texcoords 0.656250 0.679688 0.675781 0.699219; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 98 +{ + texcoords 0.726562 0.679688 0.746094 0.710938; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 99 +{ + texcoords 0.800781 0.679688 0.816406 0.699219; + size 0.400 0.500; + offset 0.100 0.000; + advance 0.500; +}; +glyph 100 +{ + texcoords 0.867188 0.679688 0.886719 0.710938; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 101 +{ + texcoords 0.937500 0.679688 0.957031 0.699219; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 102 +{ + texcoords 0.027344 0.609375 0.042969 0.640625; + size 0.400 0.800; + offset 0.100 0.000; + advance 0.400; +}; +glyph 103 +{ + texcoords 0.093750 0.601562 0.113281 0.628906; + size 0.500 0.700; + offset 0.100 -0.200; + advance 0.600; +}; +glyph 104 +{ + texcoords 0.164062 0.609375 0.183594 0.640625; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 105 +{ + texcoords 0.242188 0.609375 0.246094 0.640625; + size 0.100 0.800; + offset 0.100 0.000; + advance 0.200; +}; +glyph 106 +{ + texcoords 0.312500 0.601562 0.320312 0.640625; + size 0.200 1.000; + offset 0.000 -0.200; + advance 0.200; +}; +glyph 107 +{ + texcoords 0.375000 0.609375 0.394531 0.640625; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.500; +}; +glyph 108 +{ + texcoords 0.453125 0.609375 0.457031 0.640625; + size 0.100 0.800; + offset 0.100 0.000; + advance 0.200; +}; +glyph 109 +{ + texcoords 0.507812 0.609375 0.542969 0.628906; + size 0.900 0.500; + offset 0.100 0.000; + advance 1.000; +}; +glyph 110 +{ + texcoords 0.585938 0.609375 0.605469 0.628906; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 111 +{ + texcoords 0.656250 0.609375 0.675781 0.628906; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 112 +{ + texcoords 0.726562 0.601562 0.746094 0.628906; + size 0.500 0.700; + offset 0.100 -0.200; + advance 0.600; +}; +glyph 113 +{ + texcoords 0.796875 0.601562 0.816406 0.628906; + size 0.500 0.700; + offset 0.100 -0.200; + advance 0.600; +}; +glyph 114 +{ + texcoords 0.871094 0.609375 0.882812 0.628906; + size 0.300 0.500; + offset 0.100 0.000; + advance 0.400; +}; +glyph 115 +{ + texcoords 0.937500 0.609375 0.957031 0.628906; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.500; +}; +glyph 116 +{ + texcoords 0.027344 0.539062 0.042969 0.566406; + size 0.400 0.700; + offset 0.000 0.000; + advance 0.400; +}; +glyph 117 +{ + texcoords 0.093750 0.539062 0.113281 0.558594; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 118 +{ + texcoords 0.160156 0.539062 0.187500 0.558594; + size 0.700 0.500; + offset 0.000 0.000; + advance 0.600; +}; +glyph 119 +{ + texcoords 0.230469 0.539062 0.257812 0.558594; + size 0.700 0.500; + offset 0.100 0.000; + advance 0.800; +}; +glyph 120 +{ + texcoords 0.304688 0.539062 0.324219 0.558594; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 121 +{ + texcoords 0.371094 0.531250 0.398438 0.558594; + size 0.700 0.700; + offset 0.000 -0.200; + advance 0.600; +}; +glyph 122 +{ + texcoords 0.449219 0.539062 0.464844 0.558594; + size 0.400 0.500; + offset 0.100 0.000; + advance 0.500; +}; +glyph 123 +{ + texcoords 0.519531 0.535156 0.535156 0.570312; + size 0.400 0.900; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 124 +{ + texcoords 0.593750 0.531250 0.597656 0.570312; + size 0.100 1.000; + offset 0.100 -0.200; + advance 0.300; +}; +glyph 125 +{ + texcoords 0.660156 0.535156 0.675781 0.570312; + size 0.400 0.900; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 126 +{ + texcoords 0.726562 0.546875 0.750000 0.558594; + size 0.600 0.300; + offset 0.100 0.200; + advance 0.800; +}; +glyph 160 +{ + texcoords 0.808594 0.539062 0.808594 0.539062; + size 0.000 0.000; + offset 0.000 0.000; + advance 0.300; +}; +glyph 161 +{ + texcoords 0.875000 0.539062 0.878906 0.566406; + size 0.100 0.700; + offset 0.200 0.000; + advance 0.400; +}; +glyph 162 +{ + texcoords 0.941406 0.535156 0.957031 0.562500; + size 0.400 0.700; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 163 +{ + texcoords 0.023438 0.468750 0.042969 0.496094; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 164 +{ + texcoords 0.093750 0.468750 0.117188 0.496094; + size 0.600 0.700; + offset 0.000 0.000; + advance 0.600; +}; +glyph 165 +{ + texcoords 0.164062 0.468750 0.183594 0.496094; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 166 +{ + texcoords 0.242188 0.460938 0.246094 0.496094; + size 0.100 0.900; + offset 0.100 -0.200; + advance 0.300; +}; +glyph 167 +{ + texcoords 0.308594 0.464844 0.324219 0.496094; + size 0.400 0.800; + offset 0.000 -0.100; + advance 0.500; +}; +glyph 168 +{ + texcoords 0.378906 0.492188 0.390625 0.496094; + size 0.300 0.100; + offset 0.100 0.600; + advance 0.500; +}; +glyph 169 +{ + texcoords 0.441406 0.468750 0.468750 0.496094; + size 0.700 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 170 +{ + texcoords 0.515625 0.472656 0.535156 0.496094; + size 0.500 0.600; + offset 0.100 0.100; + advance 0.500; +}; +glyph 171 +{ + texcoords 0.589844 0.472656 0.605469 0.488281; + size 0.400 0.400; + offset 0.100 0.100; + advance 0.600; +}; +glyph 172 +{ + texcoords 0.656250 0.472656 0.679688 0.484375; + size 0.600 0.300; + offset 0.100 0.100; + advance 0.800; +}; +glyph 173 +{ + texcoords 0.730469 0.476562 0.742188 0.480469; + size 0.300 0.100; + offset 0.100 0.200; + advance 0.400; +}; +glyph 174 +{ + texcoords 0.792969 0.468750 0.820312 0.496094; + size 0.700 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 175 +{ + texcoords 0.871094 0.492188 0.882812 0.496094; + size 0.300 0.100; + offset 0.100 0.600; + advance 0.500; +}; +glyph 176 +{ + texcoords 0.941406 0.484375 0.953125 0.496094; + size 0.300 0.300; + offset 0.100 0.400; + advance 0.500; +}; +glyph 177 +{ + texcoords 0.019531 0.398438 0.046875 0.421875; + size 0.700 0.600; + offset 0.100 0.000; + advance 0.800; +}; +glyph 178 +{ + texcoords 0.097656 0.410156 0.109375 0.425781; + size 0.300 0.400; + offset 0.100 0.300; + advance 0.400; +}; +glyph 179 +{ + texcoords 0.167969 0.410156 0.179688 0.425781; + size 0.300 0.400; + offset 0.100 0.300; + advance 0.400; +}; +glyph 180 +{ + texcoords 0.242188 0.421875 0.250000 0.429688; + size 0.200 0.200; + offset 0.200 0.600; + advance 0.500; +}; +glyph 181 +{ + texcoords 0.304688 0.390625 0.328125 0.417969; + size 0.600 0.700; + offset 0.100 -0.200; + advance 0.700; +}; +glyph 182 +{ + texcoords 0.375000 0.394531 0.394531 0.425781; + size 0.500 0.800; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 183 +{ + texcoords 0.453125 0.410156 0.457031 0.414062; + size 0.100 0.100; + offset 0.100 0.300; + advance 0.300; +}; +glyph 184 +{ + texcoords 0.523438 0.390625 0.531250 0.398438; + size 0.200 0.200; + offset 0.100 -0.200; + advance 0.500; +}; +glyph 185 +{ + texcoords 0.589844 0.410156 0.601562 0.425781; + size 0.300 0.400; + offset 0.100 0.300; + advance 0.400; +}; +glyph 186 +{ + texcoords 0.660156 0.402344 0.675781 0.425781; + size 0.400 0.600; + offset 0.100 0.100; + advance 0.500; +}; +glyph 187 +{ + texcoords 0.730469 0.402344 0.746094 0.417969; + size 0.400 0.400; + offset 0.100 0.100; + advance 0.600; +}; +glyph 188 +{ + texcoords 0.789062 0.398438 0.824219 0.425781; + size 0.900 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 189 +{ + texcoords 0.859375 0.398438 0.894531 0.425781; + size 0.900 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 190 +{ + texcoords 0.929688 0.398438 0.964844 0.425781; + size 0.900 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 191 +{ + texcoords 0.027344 0.328125 0.042969 0.355469; + size 0.400 0.700; + offset 0.100 0.000; + advance 0.500; +}; +glyph 192 +{ + texcoords 0.089844 0.328125 0.117188 0.367188; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 193 +{ + texcoords 0.160156 0.328125 0.187500 0.367188; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 194 +{ + texcoords 0.230469 0.328125 0.257812 0.367188; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 195 +{ + texcoords 0.300781 0.328125 0.328125 0.367188; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 196 +{ + texcoords 0.371094 0.328125 0.398438 0.363281; + size 0.700 0.900; + offset 0.000 0.000; + advance 0.700; +}; +glyph 197 +{ + texcoords 0.441406 0.328125 0.468750 0.363281; + size 0.700 0.900; + offset 0.000 0.000; + advance 0.700; +}; +glyph 198 +{ + texcoords 0.507812 0.328125 0.542969 0.355469; + size 0.900 0.700; + offset 0.000 0.000; + advance 1.000; +}; +glyph 199 +{ + texcoords 0.585938 0.320312 0.609375 0.355469; + size 0.600 0.900; + offset 0.100 -0.200; + advance 0.800; +}; +glyph 200 +{ + texcoords 0.656250 0.328125 0.675781 0.367188; + size 0.500 1.000; + offset 0.100 0.000; + advance 0.700; +}; +glyph 201 +{ + texcoords 0.726562 0.328125 0.746094 0.367188; + size 0.500 1.000; + offset 0.100 0.000; + advance 0.700; +}; +glyph 202 +{ + texcoords 0.796875 0.328125 0.816406 0.367188; + size 0.500 1.000; + offset 0.100 0.000; + advance 0.700; +}; +glyph 203 +{ + texcoords 0.867188 0.328125 0.886719 0.363281; + size 0.500 0.900; + offset 0.100 0.000; + advance 0.700; +}; +glyph 204 +{ + texcoords 0.945312 0.328125 0.953125 0.367188; + size 0.200 1.000; + offset 0.000 0.000; + advance 0.300; +}; +glyph 205 +{ + texcoords 0.027344 0.257812 0.039062 0.296875; + size 0.300 1.000; + offset 0.100 0.000; + advance 0.300; +}; +glyph 206 +{ + texcoords 0.097656 0.257812 0.109375 0.296875; + size 0.300 1.000; + offset 0.000 0.000; + advance 0.300; +}; +glyph 207 +{ + texcoords 0.167969 0.257812 0.179688 0.292969; + size 0.300 0.900; + offset 0.000 0.000; + advance 0.300; +}; +glyph 208 +{ + texcoords 0.230469 0.257812 0.257812 0.285156; + size 0.700 0.700; + offset 0.000 0.000; + advance 0.800; +}; +glyph 209 +{ + texcoords 0.304688 0.257812 0.328125 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 210 +{ + texcoords 0.375000 0.257812 0.398438 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 211 +{ + texcoords 0.445312 0.257812 0.468750 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 212 +{ + texcoords 0.515625 0.257812 0.539062 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 213 +{ + texcoords 0.585938 0.257812 0.609375 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 214 +{ + texcoords 0.656250 0.257812 0.679688 0.292969; + size 0.600 0.900; + offset 0.100 0.000; + advance 0.800; +}; +glyph 215 +{ + texcoords 0.726562 0.257812 0.750000 0.281250; + size 0.600 0.600; + offset 0.100 0.000; + advance 0.800; +}; +glyph 216 +{ + texcoords 0.792969 0.253906 0.824219 0.289062; + size 0.800 0.900; + offset 0.000 -0.100; + advance 0.800; +}; +glyph 217 +{ + texcoords 0.867188 0.257812 0.890625 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 218 +{ + texcoords 0.937500 0.257812 0.960938 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 219 +{ + texcoords 0.023438 0.187500 0.046875 0.226562; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 220 +{ + texcoords 0.093750 0.187500 0.117188 0.222656; + size 0.600 0.900; + offset 0.100 0.000; + advance 0.800; +}; +glyph 221 +{ + texcoords 0.160156 0.187500 0.187500 0.226562; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 222 +{ + texcoords 0.234375 0.187500 0.253906 0.214844; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 223 +{ + texcoords 0.304688 0.187500 0.324219 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 224 +{ + texcoords 0.375000 0.187500 0.394531 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 225 +{ + texcoords 0.445312 0.187500 0.464844 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 226 +{ + texcoords 0.515625 0.187500 0.535156 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 227 +{ + texcoords 0.585938 0.187500 0.605469 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 228 +{ + texcoords 0.656250 0.187500 0.675781 0.214844; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 229 +{ + texcoords 0.726562 0.187500 0.746094 0.222656; + size 0.500 0.900; + offset 0.100 0.000; + advance 0.600; +}; +glyph 230 +{ + texcoords 0.789062 0.187500 0.824219 0.207031; + size 0.900 0.500; + offset 0.100 0.000; + advance 1.000; +}; +glyph 231 +{ + texcoords 0.871094 0.179688 0.886719 0.207031; + size 0.400 0.700; + offset 0.100 -0.200; + advance 0.500; +}; +glyph 232 +{ + texcoords 0.937500 0.187500 0.957031 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 233 +{ + texcoords 0.023438 0.117188 0.042969 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 234 +{ + texcoords 0.093750 0.117188 0.113281 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 235 +{ + texcoords 0.164062 0.117188 0.183594 0.144531; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 236 +{ + texcoords 0.242188 0.117188 0.250000 0.148438; + size 0.200 0.800; + offset 0.000 0.000; + advance 0.200; +}; +glyph 237 +{ + texcoords 0.312500 0.117188 0.320312 0.148438; + size 0.200 0.800; + offset 0.100 0.000; + advance 0.200; +}; +glyph 238 +{ + texcoords 0.378906 0.117188 0.390625 0.148438; + size 0.300 0.800; + offset 0.000 0.000; + advance 0.200; +}; +glyph 239 +{ + texcoords 0.449219 0.117188 0.460938 0.144531; + size 0.300 0.700; + offset 0.000 0.000; + advance 0.200; +}; +glyph 240 +{ + texcoords 0.515625 0.117188 0.535156 0.152344; + size 0.500 0.900; + offset 0.100 0.000; + advance 0.600; +}; +glyph 241 +{ + texcoords 0.585938 0.117188 0.605469 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 242 +{ + texcoords 0.656250 0.117188 0.675781 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 243 +{ + texcoords 0.726562 0.117188 0.746094 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 244 +{ + texcoords 0.796875 0.117188 0.816406 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 245 +{ + texcoords 0.867188 0.117188 0.886719 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 246 +{ + texcoords 0.937500 0.117188 0.957031 0.144531; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 247 +{ + texcoords 0.019531 0.050781 0.046875 0.070312; + size 0.700 0.500; + offset 0.100 0.100; + advance 0.800; +}; +glyph 248 +{ + texcoords 0.089844 0.042969 0.117188 0.070312; + size 0.700 0.700; + offset 0.000 -0.100; + advance 0.600; +}; +glyph 249 +{ + texcoords 0.164062 0.046875 0.183594 0.078125; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 250 +{ + texcoords 0.234375 0.046875 0.253906 0.078125; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 251 +{ + texcoords 0.304688 0.046875 0.324219 0.078125; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 252 +{ + texcoords 0.375000 0.046875 0.394531 0.074219; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 253 +{ + texcoords 0.441406 0.039062 0.468750 0.078125; + size 0.700 1.000; + offset 0.000 -0.200; + advance 0.600; +}; +glyph 254 +{ + texcoords 0.515625 0.039062 0.535156 0.078125; + size 0.500 1.000; + offset 0.100 -0.200; + advance 0.600; +}; +glyph 255 +{ + texcoords 0.582031 0.039062 0.609375 0.074219; + size 0.700 0.900; + offset 0.000 -0.200; + advance 0.600; +}; diff --git a/dejavu-10.tex b/dejavu-10.tex new file mode 100644 index 0000000000000000000000000000000000000000..c7f5313d4dc3f039c4ce61182a2a65f880bc2f36 GIT binary patch literal 131170 zcmeHQ3A|QSwLkZAFK|ICCp66=2TZX@G)#GBq^6J%p_omA11g4EU}fsd;2c+ceB6Y?6o%B?|%2Ym-T(W%h~7b|5?L- zor$y8xAyq)$4@$aSih!TeWspy#+2hup4c*R(xgdQbJJUo7&mIf=;5OeK6L!>Bg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^Enk{jW;IL5|AaN_jUz8wb1!zjBXvQ%t){*pONbY zVWxo$^?w#XQbyN5Rr8*j=_Q%_Pl#G|L3Lso-VI=x*#!OLhNg3*7ETJtC-B|or zV9u@#RkRk-%!K1j(!_m>F_V&pd0Rp@nkIw$YZHIwxHgi!%_~&~JTkuAET6S%u2>=J zPSlVgI*B%o>N_vL>R*mpLuca}e|916o4E3iz&v?d()MB|LEP5T9#@yAbW3$xnv0Cl z*X6UGy@P&GXfGqmKh+w#c8h*AF+xIpuFS!hH_MT2AxX(FuNj~9e7;H5d*&gJ*3Xp_ z)5Y6mU2e}>od54YW-QT<#r%j=dnA84t54^N5gO_`#Owof1(31tNqN=|1Vs`4sy~VD ziefTc8Qza$!0=F6z>StP%7TT1*tNncRqd{KG+_t*dH6iF%el-h6Y&S#*d!T$f>`5v1FW55{b Ip$ugI59+k0Hvj+t literal 0 HcmV?d00001 diff --git a/source/host.cpp b/source/host.cpp new file mode 100644 index 0000000..be24f05 --- /dev/null +++ b/source/host.cpp @@ -0,0 +1,95 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "host.h" +#include "netvis.h" + +using namespace std; +using namespace Msp; + +Host::Host(NetVis &nv, unsigned a): + netvis(nv), + addr(a) +{ + in_addr ina; + ina.s_addr=htonl(addr); + name=inet_ntoa(ina); +} + +void Host::set_position(const Vector2 &p) +{ + pos=p; +} + +void Host::add_connection(Connection &) +{ +} + +Connection *Host::get_connection(Host &) +{ + return 0; +} + +void Host::tick(const Msp::Time::TimeDelta &td) +{ + float dt=td/Msp::Time::sec; + + const map &hosts=netvis.get_hosts(); + float fx=-pos.x*0.1; + float fy=-pos.y*0.1; + for(map::const_iterator i=hosts.begin(); i!=hosts.end(); ++i) + { + if(i->second!=this) + { + const Vector2 &other_pos=i->second->get_position(); + float dx=other_pos.x-pos.x; + float dy=other_pos.y-pos.y; + float d2=dx*dx+dy*dy; + float d=sqrt(d2); + + unsigned other_addr=i->second->get_address(); + unsigned matching_bits=0; + for(unsigned j=32; (j-- && !((addr^other_addr)>>j));) + ++matching_bits; + + float nearness=24-min(matching_bits, 24U); + float f=10000.0*(1.0/(60+nearness*15)-1.0/d); + + fx+=dx/d*f; + fy+=dy/d*f; + } + } + + if(fx<-4 || fx>4) + pos.x+=fx*dt; + if(fy<-4 || fy>4) + pos.y+=fy*dt; +} + +void Host::render() const +{ + GL::push_matrix(); + GL::translate(static_cast(pos.x), static_cast(pos.y), 0); + + GL::Immediate imm((GL::COLOR4_UBYTE, GL::VERTEX2)); + imm.begin(GL::QUADS); + imm.color(1.0f, 1.0f, 1.0f, 1.0f); + imm.vertex(-5, -5); + imm.vertex(5, -5); + imm.vertex(5, 5); + imm.vertex(-5, 5); + imm.end(); + + const GL::Font &font=netvis.get_font(); + GL::translate(-static_cast(font.get_string_width(name)*5), 6, 0); + GL::scale_uniform(10); + font.draw_string(name); + GL::Texture::unbind(); + + GL::pop_matrix(); +} diff --git a/source/host.h b/source/host.h new file mode 100644 index 0000000..60dc547 --- /dev/null +++ b/source/host.h @@ -0,0 +1,37 @@ +#ifndef HOST_H_ +#define HOST_H_ + +#include +#include +#include +#include "vector2.h" + +class Connection; +class NetVis; + +class Host +{ +private: + NetVis &netvis; + unsigned addr; + std::string name; + Vector2 pos; + bool visible; + std::map connections; + +public: + Host(NetVis &, unsigned); + void set_position(const Vector2 &); + unsigned get_address() const { return addr; } + const std::string &get_name() const { return name; } + const Vector2 &get_position() const { return pos; } + bool get_visible() const { return visible; } + + void add_connection(Connection &); + Connection *get_connection(Host &); + + void tick(const Msp::Time::TimeDelta &); + void render() const; +}; + +#endif diff --git a/source/netvis.cpp b/source/netvis.cpp new file mode 100644 index 0000000..711788b --- /dev/null +++ b/source/netvis.cpp @@ -0,0 +1,192 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "host.h" +#include "netvis.h" +#include "packet.h" + +using namespace std; +using namespace Msp; + +NetVis::NetVis(int /*argc*/, char **argv) +{ + iface=argv[1]; +} + +int NetVis::main() +{ + char err[1024]; + pcap=pcap_open_live(iface.c_str(), 128, true, 0, err); + if(!pcap) + throw Exception(err); + + if(pcap_setnonblock(pcap, true, err)==-1) + throw Exception(err); + + dpy=new Graphics::Display; + wnd=new Graphics::Window(*dpy, 1024, 768); + glc=new Graphics::GLContext(*wnd); + wnd->set_title("NetVis"); + wnd->show(); + + GL::enable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + font=new GL::Font; + DataFile::load(*font, "dejavu-10.font"); + font_tex=new GL::Texture2D; + DataFile::load(*font_tex, "dejavu-10.tex"); + font->set_texture(*font_tex); + + Application::main(); + + delete glc; + delete wnd; + delete dpy; + + return exit_code; +} + +void NetVis::tick() +{ + Msp::Time::TimeStamp t=Msp::Time::now(); + if(!last_tick) + last_tick=t; + Msp::Time::TimeDelta dt=t-last_tick; + last_tick=t; + + dpy->tick(); + + pcap_dispatch(pcap, -1, &capture_handler, reinterpret_cast(this)); + + glClear(GL_COLOR_BUFFER_BIT); + + GL::matrix_mode(GL::PROJECTION); + GL::load_identity(); + GL::ortho_centered(1024, 768); + GL::matrix_mode(GL::MODELVIEW); + GL::load_identity(); + + for(map::iterator i=hosts.begin(); i!=hosts.end(); ++i) + { + i->second->tick(dt); + i->second->render(); + } + for(list::iterator i=packets.begin(); i!=packets.end();) + { + (*i)->tick(dt); + (*i)->render(); + if((*i)->get_stale()) + { + delete *i; + i=packets.erase(i); + } + else + ++i; + } + + GL::translate(-500, 360, 0); + for(map::iterator i=port_colors.begin(); i!=port_colors.end(); ++i) + { + GL::Color &color=i->second; + + GL::push_matrix(); + + GL::Immediate imm((GL::COLOR4_UBYTE,GL::VERTEX2)); + imm.begin(GL::QUADS); + imm.color(color.r, color.g, color.b, color.a); + for(float x=0; x<0.5; x+=0.2) + { + imm.vertex(x+0, 0); + imm.vertex(x+10, 0); + imm.vertex(x+10, 10); + imm.vertex(x+0, 10); + } + imm.end(); + + GL::translate(15, 1, 0); + GL::scale_uniform(10); + glColor4f(1.0, 1.0, 1.0, 1.0); + font->draw_string(format("%d", i->first)); + GL::Texture::unbind(); + + GL::pop_matrix(); + GL::translate(0, -12, 0); + } + + glc->swap_buffers(); +} + +Host &NetVis::get_host(unsigned a) +{ + map::iterator i=hosts.find(a); + if(i!=hosts.end()) + return *i->second; + + Host *host=new Host(*this, a); + host->set_position(Vector2(rand()*30.0/RAND_MAX-15.0, rand()*20.0/RAND_MAX-10.0)); + hosts[a]=host; + return *host; +} + +GL::Color &NetVis::get_port_color(unsigned port) +{ + map::iterator i=port_colors.find(port); + if(i!=port_colors.end()) + return i->second; + + GL::Color color; + while(1) + { + color.r=rand()*1.0/RAND_MAX; + color.g=rand()*1.0/RAND_MAX; + color.b=rand()*1.0/RAND_MAX; + if(color.r>0.5 || color.g>0.5 || color.b>0.7) + break; + } + color.a=0.4f; + return port_colors[port]=color; +} + +void NetVis::capture_handler(unsigned char *user, const pcap_pkthdr *, const unsigned char *data) +{ + NetVis *self=reinterpret_cast(user); + + const ethhdr *eth=reinterpret_cast(data); + if(ntohs(eth->h_proto)==ETH_P_IP) + { + const iphdr *ip=reinterpret_cast(eth+1); + + //cout<<"IP packet of "<len<<'/'<tot_len)<<" bytes\n"; + + unsigned port=0; + if(ip->protocol==IPPROTO_TCP) + { + const tcphdr *tcp=reinterpret_cast(ip+1); + port=min(ntohs(tcp->source), ntohs(tcp->dest)); + } + else if(ip->protocol==IPPROTO_UDP) + { + const udphdr *udp=reinterpret_cast(ip+1); + port=min(ntohs(udp->source), ntohs(udp->dest)); + } + Host &shost=self->get_host(ntohl(ip->saddr)); + Host *dhost=0; + if((ntohl(ip->daddr)&0xFF)!=0xFF) + dhost=&self->get_host(ntohl(ip->daddr)); + self->packets.push_back(new Packet(shost, dhost, self->get_port_color(port), ntohs(ip->tot_len))); + } +} + +Application::RegApp NetVis::reg; diff --git a/source/netvis.h b/source/netvis.h new file mode 100644 index 0000000..daec1cf --- /dev/null +++ b/source/netvis.h @@ -0,0 +1,48 @@ +#ifndef NETVIS_H_ +#define NETVIS_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class Packet; +class Host; + +class NetVis: public Msp::Application +{ +private: + std::string iface; + pcap_t *pcap; + std::list packets; + std::map hosts; + Msp::Graphics::Display *dpy; + Msp::Graphics::Window *wnd; + Msp::Graphics::GLContext *glc; + Msp::Time::TimeStamp last_tick; + std::map port_colors; + Msp::GL::Font *font; + Msp::GL::Texture2D *font_tex; + +public: + NetVis(int, char **); + int main(); + const Msp::GL::Font &get_font() const { return *font; } + const std::map &get_hosts() const { return hosts; } +private: + virtual void tick(); + Host &get_host(unsigned); + Msp::GL::Color &get_port_color(unsigned); + + static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *); + + static Application::RegApp reg; +}; + +#endif diff --git a/source/packet.cpp b/source/packet.cpp new file mode 100644 index 0000000..491e807 --- /dev/null +++ b/source/packet.cpp @@ -0,0 +1,72 @@ +#include +#include +#include +#include +#include +#include "host.h" +#include "packet.h" + +using namespace Msp; + +Packet::Packet(const Host &s, const Host *d, const GL::Color &c, unsigned i): + src(s), + dest(d), + color(c), + x(0), + size(cbrt(i)), + angle(rand()*180.0/RAND_MAX), + rspeed(rand()*180.0/RAND_MAX-90.0) +{ +} + +void Packet::tick(const Time::TimeDelta &dt) +{ + double f=dt/Time::sec; + x+=f; + if(x>1) + x=1; + angle+=rspeed*f; + if(angle<0) + angle+=360; + if(angle>=360) + angle-=360; +} + +void Packet::render() const +{ + GL::push_matrix(); + + const Vector2 &spos=src.get_position(); + + if(dest) + { + const Vector2 &dpos=dest->get_position(); + GL::translate(spos.x*(1-x)+dpos.x*x, spos.y*(1-x)+dpos.y*x, 0); + GL::rotate(angle, 0, 0, 1); + + GL::Immediate imm((GL::COLOR4_UBYTE,GL::VERTEX2)); + imm.begin(GL::QUADS); + imm.color(color.r, color.g, color.b, color.a); + imm.vertex(-size, -size); + imm.vertex(size, -size); + imm.vertex(size, size); + imm.vertex(-size, size); + imm.end(); + } + else + { + GL::translate(spos.x, spos.y, 0); + GL::Immediate imm((GL::COLOR4_UBYTE,GL::VERTEX2)); + imm.begin(GL::TRIANGLE_FAN); + imm.color(color.r, color.g, color.b, color.a*(1-x)); + imm.vertex(0, 0); + for(unsigned i=0; i<=24; ++i) + { + float a=i*M_PI/12; + imm.vertex(cos(a)*x*200, sin(a)*x*200); + } + imm.end(); + } + + GL::pop_matrix(); +} diff --git a/source/packet.h b/source/packet.h new file mode 100644 index 0000000..cfeb2df --- /dev/null +++ b/source/packet.h @@ -0,0 +1,27 @@ +#ifndef PACKET_H_ +#define PACKET_H_ + +#include +#include + +class Host; + +class Packet +{ +private: + const Host &src; + const Host *dest; + Msp::GL::Color color; + float x; + float size; + float angle; + float rspeed; + +public: + Packet(const Host &, const Host *, const Msp::GL::Color &, unsigned); + bool get_stale() const { return x>=1; } + void tick(const Msp::Time::TimeDelta &); + void render() const; +}; + +#endif diff --git a/source/vector2.h b/source/vector2.h new file mode 100644 index 0000000..0ff927c --- /dev/null +++ b/source/vector2.h @@ -0,0 +1,12 @@ +#ifndef VECTOR2_H_ +#define VECTOR2_H_ + +struct Vector2 +{ + float x, y; + + Vector2(): x(0), y(0) { } + Vector2(float x_, float y_): x(x_), y(y_) { } +}; + +#endif -- 2.43.0