Auto Code Generation for Switch Packet Header Libraries
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing packet generation tools for switch diagnostics are limited by firmware size constraints, dependencies on specific libraries and development environments, and inability to generate certain packet header types, leading to time-consuming and bloated firmware implementations.
Innovation Solution
An auto code generation tool that generates source code for packet header libraries by receiving a description of packet headers in a specific format, allowing for the creation of a header library that can be compiled and installed in switch firmware, enabling the generation of various packet headers without requiring full integration of external libraries.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If full-fledged packet-generation libraries are integrated into firmware, then packet header generation capability is improved, but firmware size increases beyond limitations
Solution Approach 1:
The patent extracts only the essential packet header generation functionality from full-fledged packet-generation libraries, creating a streamlined version that fits within firmware size constraints. This involves selectively including only the code needed for generating packet headers for diagnostic routines, while excluding unnecessary components such as packet transmission functions, inspection routines, and other non-essential elements.
Solution Approach 2:
The patent segments the packet generation functionality into modular components that can be selectively included in firmware. By dividing the library into discrete, independently compilable modules, the system can include only the specific packet header generation capabilities needed for diagnostic purposes, rather than integrating entire library suites.
2Adaptability or versatility
If packet-generation libraries are ported to firmware format, then packet header generation is enabled, but development time increases
Solution Approach 1:
The patent performs preliminary actions by creating a standardized framework and template structures for packet header generation before actual firmware integration. By establishing pre-defined field structures, data type mappings, and generation algorithms in advance, the system reduces the time required for porting and adapting libraries to specific firmware environments.
Solution Approach 2:
The patent creates a universal packet header generation framework that can handle multiple packet types and protocols through a common interface and structure. This multi-functional approach allows the same codebase to generate headers for various packet formats (Ethernet, IP, TCP, UDP, etc.) without requiring separate porting efforts for each protocol.
3Ease of manufacture
If procedural language interfaces are used for packet generation libraries, then library functionality is available, but scripting language invocation becomes difficult
Solution Approach 1:
The patent introduces an intermediary layer that bridges procedural language interfaces and scripting language environments. This mediator provides a standardized API that can be called from scripting languages while maintaining compatibility with the underlying procedural code, enabling seamless integration without requiring complete interface rewriting.
4Productivity
If existing packet generation tools are used, then some packet headers can be generated, but certain packet header types cannot be created
Solution Approach 1:
The patent implements a dynamic packet header generation system that can adapt to new packet types and protocols as they emerge. Rather than being constrained by pre-defined templates for known protocols only, the system uses configurable field structures and type mappings that can be extended to accommodate proprietary protocols and future standards without requiring complete tool redesign.
Data Source
AI summary
Techniques are disclosed for describing packet headers in a format that can be used by a code generation tool to generate source code that can generate any type of packet header when compiled and invoked within switch/router firmware. Such packet headers may then be used in a variety of switch diagnostic/testing functions. A code generation tool may be configured to receive a description of a packet header in the description format. The packet description language provides an easily used approach for defining fields in a packet header. Further, the code generation tool may be configured to generate packet header library for use by firmware on a network device, e.g., for testing and diagnostic functions.


