Example #1
0
        private static void LoadPluginInterface(PluginInterface plgif)
        {
            if (plgif.DevicePacketCaptureHandlers != null)
            {
                foreach (var handler in plgif.DevicePacketCaptureHandlers)
                {
                    GatePacketManager.RawPacketEntried += handler;
                }
            }

            if (plgif.DeviceClasses != null)
            {
                foreach (var devc in plgif.DeviceClasses)
                {
                    DeviceManager.Instance.AddDevice(devc);
                }
            }

            if (plgif.PacketViewClasses != null)
            {
                foreach (var viewc in plgif.PacketViewClasses)
                {
                    PacketViewManager.Instance.AddView(viewc);
                }
            }

            if (plgif.PacketLogFormatClasses != null)
            {
                foreach (var format in plgif.PacketLogFormatClasses)
                {
                    if (format.CanRead)
                    {
                        FileManager.FileOpen.Formats.Add(format);
                        FileManager.PacketLogOpen.Formats.Add(format);
                    }
                    if (format.CanWrite)
                    {
                        FileManager.PacketLogSave.Formats.Add(format);
                    }
                }
            }
        }
Example #2
0
 public PluginContext(PluginClass plgc, PluginInterface plgp)
 {
     Class   = plgc;
     Profile = plgp;
 }