code: def addfield(self, pkt, s, val):
          
          tmp_len = self.length_of(pkt)
          if tmp_len == 0:
              return s
          internal = self.i2m(pkt, val)[-tmp_len:]
          return s + struct.pack("!%ds" % tmp_len, internal)
docs: Add an internal value  to a string