Script Modules

Script Modules are independent entities that add new functionality to Packet Tracer similar to External Applications (ExApps). But unlike ExApps, Script Modules run within PT rather than as external processes, and therefore, provide better integration with PT. Also unlike ExApps, Script Modules are developed directly in PT with no external development environment needed. While the basic components of Script Modules are not new -- PT already has had a script engine, web views, and IPC in various internal components for some time, Script Modules simply unite them and provide a generic way to extend PT functionality.


Packet Tracer Architecture

Illustrated above is an architectural view of PT's run-time components showing that Script Modules are running inside the PT process. Script Modules communicate with the PT core the same way that ExApps communicate with PT, using Inter-Process Communication (IPC) calls. The IPC framework in PT has been extended to allow direct object manipulation, using objects in calls, event callbacks, and delegates. Script Modules and ExApps can also talk to each other using the PT messaging mechanism between ExApps.


Script Module Architecture

Each Script Module can be described using the Model-View-Controller architectural pattern.

Each Script Module has its own sandbox, and cannot access or change the sandbox of other Script Modules.


Types of Script Modules

There are two places where Script Modules can exist, and so they are named appropriately.

The following table is a summary of differences between the two types of Script Modules:

  PT Script Module File Script Module
  • Per PT install
  • PT can have multiple PT Script Modules
One per pka/pkt file
Manage Add/remove in Extensions->Scripting->Configure PT Script Modules... Open the pka/pkt file, and go to Extensions->Scripting->Edit File Script Module...
  • On PT start
  • On demand
  • Disabled
  • On file open
  • Cannot disable
Stop On PT close On file close
Manual start/stop Yes Yes
Security privileges
  • When the user adds a PT Script Module, it shows in the dialog
  • If a user does not feel safe with the requested privileges, the Script Module can be removed
  • When the file opens, PT prompts the user to allow the File Script Module to run
  • If denied, the pka/pkt file may still open but not function correctly or may be prevented from opening. The File Script Module developer decides which action