The protobuf file for PTX10k EVO cannot be used during compilation due to duplicate ID declarations within the .proto files. In contrast, the protobuf file for MX (Junos) functions correctly on the PTX10008 EVO platform and does not exhibit any ID collisions.
.proto
This issue is specific to the Golang compilation of JTI protobuf files. The Golang protoc plugin automatically capitalizes the first letter of message names during code generation. As a result, it can cause naming conflicts when two .proto files define messages with names that differ only in case.
protoc
For example, if one file defines message state and another defines message State, both will be translated into the same Go struct: type State struct. This leads to a collision in the generated Go stub files, causing compilation to fail.
message state
message State
type State struct
To resolve the Golang compilation issue, the message name `state` in the `ddosd-junos-state-ddos-protection-render.proto` file can be renamed to `state_212`. This avoids naming conflicts during Go stub generation. The required changes are as follows:
```diff
diff ddosd-junos-state-ddos-protection-render.proto.modified ddosd-junos-state-ddos-protection-render.proto
11c11
< optional state_212 jnpr_state_212_ext = 212;
---
> optional state jnpr_state_ext = 212;
14c14
< message state_212 { // /state
> message state { // /state
```
By applying this change, the protobuf file can be compiled successfully, and the package can be generated and used without conflict. This naming convention aligns with other existing `.proto` files, and we will incorporate this update into the Junos repository. The newly published JTI package will include the corrected protobuf file.