@@ -602,7 +602,7 @@ def _members_cb(pkt, lst, cur, remain):
602602 ].Value
603603 return functools .partial (
604604 NRBFMemberPrimitiveUnTyped ,
605- type = PrimitiveTypeEnum (primitiveType ),
605+ primtype = PrimitiveTypeEnum (primitiveType ),
606606 )
607607 return NRBFRecord
608608
@@ -639,14 +639,14 @@ class NRBFClassInfo(Packet):
639639
640640
641641class NRBFAdditionalInfo (Packet ):
642- __slots__ = ["type " ]
642+ __slots__ = ["bintype " ]
643643
644644 fields_desc = [
645645 MultipleTypeField (
646646 [
647647 (
648648 ByteEnumField ("Value" , 0 , PrimitiveTypeEnum ),
649- lambda pkt : pkt .type
649+ lambda pkt : pkt .bintype
650650 in [
651651 BinaryTypeEnum .Primitive ,
652652 BinaryTypeEnum .PrimitiveArray ,
@@ -656,30 +656,30 @@ class NRBFAdditionalInfo(Packet):
656656 PacketField (
657657 "Value" , NRBFLengthPrefixedString (), NRBFLengthPrefixedString
658658 ),
659- lambda pkt : pkt .type == BinaryTypeEnum .SystemClass ,
659+ lambda pkt : pkt .bintype == BinaryTypeEnum .SystemClass ,
660660 ),
661661 (
662662 PacketField ("Value" , NRBFClassTypeInfo (), NRBFClassTypeInfo ),
663- lambda pkt : pkt .type == BinaryTypeEnum .Class ,
663+ lambda pkt : pkt .bintype == BinaryTypeEnum .Class ,
664664 ),
665665 ],
666666 StrFixedLenField ("Value" , b"" , length = 0 ),
667667 ),
668668 ]
669669
670670 def __init__ (self , _pkt = None , ** kwargs ):
671- self .type = kwargs .pop ("type " , BinaryTypeEnum .Primitive )
672- assert isinstance (self .type , BinaryTypeEnum )
671+ self .bintype = kwargs .pop ("bintype " , BinaryTypeEnum .Primitive )
672+ assert isinstance (self .bintype , BinaryTypeEnum )
673673 super (NRBFAdditionalInfo , self ).__init__ (_pkt , ** kwargs )
674674
675675 def clone_with (self , * args , ** kwargs ):
676676 pkt = super (NRBFAdditionalInfo , self ).clone_with (* args , ** kwargs )
677- pkt .type = self .type
677+ pkt .bintype = self .bintype
678678 return pkt
679679
680680 def copy (self ):
681681 pkt = super (NRBFAdditionalInfo , self ).copy ()
682- pkt .type = self .type
682+ pkt .bintype = self .bintype
683683 return pkt
684684
685685 def default_payload_class (self , payload ):
@@ -715,7 +715,7 @@ def _member_type_infos_cb(pkt, lst, cur, remain):
715715 # Return BinaryTypeEnum tainted with a pre-selected type.
716716 return functools .partial (
717717 NRBFAdditionalInfo ,
718- type = typeEnum ,
718+ bintype = typeEnum ,
719719 )
720720
721721
@@ -752,30 +752,30 @@ class NRBFClassWithId(NRBFRecord):
752752
753753
754754class NRBFMemberPrimitiveUnTyped (Packet ):
755- __slots__ = ["type " ]
755+ __slots__ = ["primtype " ]
756756
757757 fields_desc = [
758758 NRBFValueWithCode .fields_desc [1 ],
759759 ]
760760
761761 def __init__ (self , _pkt = None , ** kwargs ):
762- self .type = kwargs .pop ("type " , PrimitiveTypeEnum .Byte )
763- assert isinstance (self .type , PrimitiveTypeEnum )
762+ self .primtype = kwargs .pop ("primtype " , PrimitiveTypeEnum .Byte )
763+ assert isinstance (self .primtype , PrimitiveTypeEnum )
764764 super (NRBFMemberPrimitiveUnTyped , self ).__init__ (_pkt , ** kwargs )
765765
766766 def clone_with (self , * args , ** kwargs ):
767767 pkt = super (NRBFMemberPrimitiveUnTyped , self ).clone_with (* args , ** kwargs )
768- pkt .type = self .type
768+ pkt .primtype = self .primtype
769769 return pkt
770770
771771 def copy (self ):
772772 pkt = super (NRBFMemberPrimitiveUnTyped , self ).copy ()
773- pkt .type = self .type
773+ pkt .primtype = self .primtype
774774 return pkt
775775
776776 @property
777777 def PrimitiveType (self ):
778- return self .type
778+ return self .primtype
779779
780780 def default_payload_class (self , payload ):
781781 return conf .padding_layer
@@ -848,7 +848,7 @@ def _values_singleprim_cb(pkt, lst, cur, remain):
848848 return None
849849 return functools .partial (
850850 NRBFMemberPrimitiveUnTyped ,
851- type = PrimitiveTypeEnum (pkt .PrimitiveTypeEnum ),
851+ primtype = PrimitiveTypeEnum (pkt .PrimitiveTypeEnum ),
852852 )
853853
854854
0 commit comments