Object

net.psforever.packet

PacketCoding

Related Doc: package packet

Permalink

object PacketCoding

Source
PacketCoding.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PacketCoding
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def CreateControlPacket(packet: PlanetSideControlPacket): ControlPacket

    Permalink

    Access to the ControlPacket constructor.

    Access to the ControlPacket constructor.

    packet

    a PlanetSideControlPacket

    returns

    a ControlPacket

  5. def CreateCryptoPacket(sequence: Int, packet: PlanetSideCryptoPacket): CryptoPacket

    Permalink

    Access to the CryptoPacket constructor.

    Access to the CryptoPacket constructor.

    sequence

    na

    packet

    a PlanetSideCryptoPacket

    returns

    a CryptoPacket

  6. def CreateGamePacket(sequence: Int, packet: PlanetSideGamePacket): GamePacket

    Permalink

    Access to the GamePacket constructor.

    Access to the GamePacket constructor.

    sequence

    na

    packet

    a PlanetSideGamePacket

    returns

    a GamePacket

  7. def DecodeControlPacket(msg: ByteVector): Attempt[PlanetSideControlPacket]

    Permalink

    Transform a ByteVector into a ControlPacket.

    Transform a ByteVector into a ControlPacket.

    msg

    the the raw data to decode

    returns

    a PlanetSideControlPacket

  8. def DecodeGamePacket(msg: ByteVector): Attempt[PlanetSideGamePacket]

    Permalink

    Transform a ByteVector into a GamePacket.

    Transform a ByteVector into a GamePacket.

    msg

    the the raw data to decode

    returns

    a PlanetSideGamePacket

  9. def DecodePacket(msg: ByteVector): Attempt[PlanetSidePacket]

    Permalink

    Transforms ByteVector data into a PlanetSide packet.

    Transforms ByteVector data into a PlanetSide packet. Similar to the UnmarshalPacket but it does not process packet headers. It supports GamePacket in exchange for not supporting CryptoPacket (like UnMarshalPacket). Mostly used in tests.

    msg

    raw, unencrypted packet

    returns

    PlanetSidePacket

    See also

    UnMarshalPacket

  10. def EncodePacket(packet: PlanetSideGamePacket): Attempt[BitVector]

    Permalink

    Overloaded method for transforming a GamePacket into its BitVector representation.

    Overloaded method for transforming a GamePacket into its BitVector representation.

    packet

    the game packet to encode

    returns

    a BitVector translated from the packet's data

  11. def EncodePacket(packet: PlanetSideCryptoPacket): Attempt[BitVector]

    Permalink

    Overloaded method for transforming a CryptoPacket into its BitVector representation.

    Overloaded method for transforming a CryptoPacket into its BitVector representation.

    packet

    the crypto packet to encode

    returns

    a BitVector translated from the packet's data

  12. def EncodePacket(packet: PlanetSideControlPacket): Attempt[BitVector]

    Permalink

    Overloaded method for transforming a ControlPacket into its BitVector representation.

    Overloaded method for transforming a ControlPacket into its BitVector representation.

    packet

    the control packet to encode

    returns

    a BitVector translated from the packet's data

  13. def MarshalPacket(packet: PlanetSidePacketContainer): Attempt[BitVector]

    Permalink

    Transform a kind of packet into the sequence of data that represents it.

    Transform a kind of packet into the sequence of data that represents it. Wraps around the encoding process for all valid packet container types.

    packet

    the packet to encode

    returns

    a BitVector translated from the packet's data

  14. final val PLANETSIDE_MIN_PACKET_SIZE: Int(1)

    Permalink

    A lower bound on the packet size

  15. def UnmarshalPacket(msg: ByteVector): Attempt[PlanetSidePacketContainer]

    Permalink

    Helper function to decode a packet without specifying a crypto state.

    Helper function to decode a packet without specifying a crypto state. Used when there is no crypto state available such as in tests.

    msg

    packet data bytes

    returns

    PlanetSidePacketContainer

  16. def UnmarshalPacket(msg: ByteVector, cryptoState: Type): Attempt[PlanetSidePacketContainer]

    Permalink

    Transforms ByteVector data into a PlanetSide packet.

    Transforms ByteVector data into a PlanetSide packet. Attempt to decode with an optional header and required payload. Does not decode into a GamePacket.

    msg

    the raw packet

    cryptoState

    the current state of the connection's crypto. This is only used when decoding crypto packets as they do not have opcodes

    returns

    PlanetSidePacketContainer

  17. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def decryptPacket(crypto: CryptoStateWithMAC, packet: EncryptedPacket): Attempt[PlanetSidePacketContainer]

    Permalink

    Perform decryption on an EncryptedPacket.

    Perform decryption on an EncryptedPacket.

    crypto

    the current state of the connection's crypto

    packet

    an encrypted packet

    returns

    a general packet container type

  20. def decryptPacketData(crypto: CryptoStateWithMAC, packet: EncryptedPacket): Attempt[ByteVector]

    Permalink

    Compose the decrypted payload data from a formerly encrypted packet.

    Compose the decrypted payload data from a formerly encrypted packet.

    crypto

    the current state of the connection's crypto

    packet

    an encrypted packet

    returns

    a sequence of decrypted data

  21. def encryptPacket(crypto: CryptoStateWithMAC, sequenceNumber: Int, rawPacket: ByteVector): Attempt[EncryptedPacket]

    Permalink

    Perform encryption on the packet's raw data.

    Perform encryption on the packet's raw data.

    crypto

    the current cryptographic state

    sequenceNumber

    na

    rawPacket

    a ByteVector that represents the packet data

    returns

    an EncryptedPacket

  22. def encryptPacket(crypto: CryptoStateWithMAC, packet: PlanetSidePacketContainer): Attempt[EncryptedPacket]

    Permalink

    Encrypt the provided packet using the provided cryptographic state.

    Encrypt the provided packet using the provided cryptographic state. Translate the packet into data to send on to the actual encryption process.

    crypto

    the current cryptographic state

    packet

    the unencrypted packet

    returns

    an EncryptedPacket

  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  27. def getPacketDataForEncryption(packet: PlanetSidePacketContainer): Attempt[(Int, ByteVector)]

    Permalink

    Transform the privileged packet into a RawPacket representation to get: the sequence number, and the raw ByteVector data.

    Transform the privileged packet into a RawPacket representation to get: the sequence number, and the raw ByteVector data.

    packet

    the unencrypted packet

    returns

    paired data based on the packet

  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  30. def makeRawPacket(packet: PlanetSidePacketContainer): Attempt[BitVector]

    Permalink

    Transform either a GamePacket or a ControlPacket into a BitVector.

    Transform either a GamePacket or a ControlPacket into a BitVector. This is not as thorough as the process of unmarshalling though the results are very similar.

    packet

    a packet

    returns

    a BitVector that represents the packet

  31. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. def unmarshalPayload(sequenceNumber: Int, payload: ByteVector): Attempt[PlanetSidePacketContainer]

    Permalink

    Transform decrypted packet data into the type of packet that it represents.

    Transform decrypted packet data into the type of packet that it represents. Will not compose data into an EncryptedPacket or into a CryptoPacket.

    sequenceNumber

    na

    payload

    the decrypted packet data

    returns

    a general packet container type

  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped