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

type: object
required:
  - header
  - buffer_id
  - total_len
  - in_port
  - reason
  - data
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
  in_port:
    type: integer
    minimum: 0
    maximum: 65535
    default: 1
  reason:
    $ref: definitions.json#/ofp_packet_in_reason
  data:
    $ref: definitions.json#/data
