$schema: http://json-schema.org/draft-04/schema#
description: Schema describing an OpenFlow packet in message, version 1.3
id: of13/ofp_packet_in.json

type: object
required:
  - header
  - buffer_id
  - total_len
  - reason
  - table_id
  - cookie
  - match
properties:
  header:
    allOf:
      - $ref: definitions.json#/ofp_header
      - properties:
          type:
            enum: [OFPT_PACKET_IN]
            default: OFPT_PACKET_IN
  buffer_id:
    type: integer
    minimum: 0
    maximum: 4294967295
    default: 0
  total_len:
    type: integer
    minimum: 0
    maximum: 65535
    default: 0
  reason:
    $ref: definitions.json#/ofp_packet_in_reason
  table_id:
    type: integer
    minimum: 0
    maximum: 255
    default: 0
  cookie:
    type: string
    pattern: ^[a-fA-F0-9]{16}$
    default: '0000000000000000'
  match:
    $ref: definitions.json#/ofp_match
  data:
    $ref: definitions.json#/optional_data
