netgate-packet-trace API (24.06)

This YANG module provides a Netgate-defined data-model for tracing packets using Classifier filters.

Copyright 2020 Rubicon Communications, LLC.

packet-trace-config

returns netgate.packet.trace.PacketTraceConfig

Configuration for packet tracing filters.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:packet-trace-config": {
    }
}

creates netgate.packet.trace.PacketTraceConfig

Configuration for packet tracing filters.

Request Body schema: application/yang-data+json

netgate.packet.trace.PacketTraceConfig to be added to list

object (netgate.packet.trace.packettraceconfig.Filters)

Table of filters that select traced packets.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:filters": {
    }
}

creates or updates netgate.packet.trace.PacketTraceConfig

Configuration for packet tracing filters.

Request Body schema: application/yang-data+json

netgate.packet.trace.PacketTraceConfig to be added or updated

object (netgate.packet.trace.PacketTraceConfig)

Configuration for packet tracing filters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:packet-trace-config": {
    }
}

removes netgate.packet.trace.PacketTraceConfig

Configuration for packet tracing filters.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.trace.packettraceconfig.Filters

Table of filters that select traced packets.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:filters": {
    }
}

creates netgate.packet.trace.packettraceconfig.Filters

Table of filters that select traced packets.

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.Filters to be added to list

Array of objects (netgate.packet.trace.packettraceconfig.filters.Filter)

An unordered list of named filters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:filter": [
    ]
}

creates or updates netgate.packet.trace.packettraceconfig.Filters

Table of filters that select traced packets.

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.Filters to be added or updated

object (netgate.packet.trace.packettraceconfig.Filters)

Table of filters that select traced packets.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:filters": {
    }
}

removes netgate.packet.trace.packettraceconfig.Filters

Table of filters that select traced packets.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

creates netgate.packet.trace.packettraceconfig.filters.Filter

An unordered list of named filters.

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.Filter to be added to list

object (netgate.packet.trace.packettraceconfig.filters.filter.Match)

Trace filter match values.

netgate-packet-trace:name
string

The trace filter's name.

netgate-packet-trace:description
string

The brief description of the trace filter.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:match": {
    },
  • "netgate-packet-trace:name": "string",
  • "netgate-packet-trace:description": "string"
}

returns netgate.packet.trace.packettraceconfig.filters.Filter

An unordered list of named filters.

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:filter": {
    }
}

creates or updates netgate.packet.trace.packettraceconfig.filters.Filter

An unordered list of named filters.

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.Filter to be added or updated

object (netgate.packet.trace.packettraceconfig.filters.Filter)

An unordered list of named filters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:filter": {
    }
}

removes netgate.packet.trace.packettraceconfig.filters.Filter

An unordered list of named filters.

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.trace.packettraceconfig.filters.filter.Match

Trace filter match values.

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:match": {
    }
}

creates netgate.packet.trace.packettraceconfig.filters.filter.Match

Trace filter match values.

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.filter.Match to be added to list

object (netgate.packet.trace.packettraceconfig.filters.filter.match.L4)

L4 fields

object (netgate.packet.trace.packettraceconfig.filters.filter.match.L2)

L2 fields

object (netgate.packet.trace.packettraceconfig.filters.filter.match.L3)

L3 fields

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:l4": {
    },
  • "netgate-packet-trace:l2": {
    },
  • "netgate-packet-trace:l3": {
    }
}

creates or updates netgate.packet.trace.packettraceconfig.filters.filter.Match

Trace filter match values.

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.filter.Match to be added or updated

object (netgate.packet.trace.packettraceconfig.filters.filter.Match)

Trace filter match values.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:match": {
    }
}

removes netgate.packet.trace.packettraceconfig.filters.filter.Match

Trace filter match values.

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.trace.packettraceconfig.filters.filter.match.L2

L2 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l2"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:l2": {
    }
}

creates netgate.packet.trace.packettraceconfig.filters.filter.match.L2

L2 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.filter.match.L2 to be added to list

object (netgate.packet.fields.L2Ethernet)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:ethernet": {
    }
}

creates or updates netgate.packet.trace.packettraceconfig.filters.filter.match.L2

L2 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.filter.match.L2 to be added or updated

object (netgate.packet.trace.packettraceconfig.filters.filter.match.L2)

L2 fields

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:l2": {
    }
}

removes netgate.packet.trace.packettraceconfig.filters.filter.match.L2

L2 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l2"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.fields.L2Ethernet

L2 ethernet fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l2/ethernet"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:ethernet": {
    }
}

creates netgate.packet.fields.L2Ethernet

L2 ethernet fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L2Ethernet to be added to list

object (netgate.packet.fields.l2ethernet.VlanDot1q)
netgate-packet-trace:source-mac-address
string

Source MAC address

netgate-packet-trace:destination-mac-address
string

Destination MAC address

netgate-packet-trace:ethertype
string

An IETF Ethertype name or a value in the range 0x600 - 0xffff.

netgate-packet-trace:source-mask
string

Source MAC address mask

netgate-packet-trace:destination-mask
string

Destination MAC address mask

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:vlan-dot1q": {
    },
  • "netgate-packet-trace:source-mac-address": "string",
  • "netgate-packet-trace:destination-mac-address": "string",
  • "netgate-packet-trace:ethertype": "string",
  • "netgate-packet-trace:source-mask": "string",
  • "netgate-packet-trace:destination-mask": "string"
}

creates or updates netgate.packet.fields.L2Ethernet

L2 ethernet fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L2Ethernet to be added or updated

object (netgate.packet.fields.L2Ethernet)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:ethernet": {
    }
}

removes netgate.packet.fields.L2Ethernet

L2 ethernet fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l2/ethernet"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.fields.l2ethernet.VlanDot1q

returns netgate.packet.fields.l2ethernet.VlanDot1q

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l2/ethernet/vlan-dot1q"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:vlan-dot1q": {
    }
}

creates netgate.packet.fields.l2ethernet.VlanDot1q

creates netgate.packet.fields.l2ethernet.VlanDot1q

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.l2ethernet.VlanDot1q to be added to list

netgate-packet-trace:pcp
integer <int32>

The dot1q VLAN Priority Code Point (class of service).

object (netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad)
netgate-packet-trace:tag
integer <int32>

The dot1q VLAN tag value.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:pcp": 0,
  • "netgate-packet-trace:vlan-dot1ad": {
    },
  • "netgate-packet-trace:tag": 0
}

creates or updates netgate.packet.fields.l2ethernet.VlanDot1q

creates or updates netgate.packet.fields.l2ethernet.VlanDot1q

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.l2ethernet.VlanDot1q to be added or updated

object (netgate.packet.fields.l2ethernet.VlanDot1q)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:vlan-dot1q": {
    }
}

removes netgate.packet.fields.l2ethernet.VlanDot1q

removes netgate.packet.fields.l2ethernet.VlanDot1q

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l2/ethernet/vlan-dot1q"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad

returns netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l2/ethernet/vlan-dot1q/vlan-dot1ad"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:vlan-dot1ad": {
    }
}

creates netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad

creates netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad to be added to list

netgate-packet-trace:pcp
integer <int32>

The dot1ad outer VLAN Priority Code Point (class of service).

netgate-packet-trace:tag
integer <int32>

The dot1ad outer VLAN tag value.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:pcp": 0,
  • "netgate-packet-trace:tag": 0
}

creates or updates netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad

creates or updates netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad to be added or updated

object (netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:vlan-dot1ad": {
    }
}

removes netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad

removes netgate.packet.fields.l2ethernet.vlandot1q.VlanDot1ad

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l2/ethernet/vlan-dot1q/vlan-dot1ad"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.trace.packettraceconfig.filters.filter.match.L3

L3 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l3"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:l3": {
    }
}

creates netgate.packet.trace.packettraceconfig.filters.filter.match.L3

L3 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.filter.match.L3 to be added to list

object (netgate.packet.fields.L3Ip4)

This group describes the fields of an IPv4 packet.

object (netgate.packet.fields.L3Ip6)

This group describes the fields of an IPv6 packet.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:ipv4": {
    },
  • "netgate-packet-trace:ipv6": {
    }
}

creates or updates netgate.packet.trace.packettraceconfig.filters.filter.match.L3

L3 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.filter.match.L3 to be added or updated

object (netgate.packet.trace.packettraceconfig.filters.filter.match.L3)

L3 fields

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:l3": {
    }
}

removes netgate.packet.trace.packettraceconfig.filters.filter.match.L3

L3 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l3"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.fields.L3Ip4

L3 IPv4 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l3/ipv4"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:ipv4": {
    }
}

creates netgate.packet.fields.L3Ip4

L3 IPv4 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L3Ip4 to be added to list

netgate-packet-trace:fragmentation-offset
integer <int32>

The fragmentation-offset specifies the offset of a particular fragment relative to the beginning of the original unfragmented IP datagram.

netgate-packet-trace:flags
string

Flags used in the handling of fragments.

netgate-packet-trace:length
integer <int32>

The total length field states the size of the entire packet in bytes.

netgate-packet-trace:ihl
integer <int32>

The internet header length (ihl) states the size of the IPv4 header in 32-byte quantities. Minimum value is 5.

netgate-packet-trace:ttl
integer <int32>

In practice, the TTL field specifies the number of router hops a packet can traverse before it is dropped.

netgate-packet-trace:version
integer <int32>

For IPv4, this field should be 4.

netgate-packet-trace:ecn
integer <int32>

The Explicit Congestion Notification value.

netgate-packet-trace:protocol
integer <int32>

This field specifies the protocol used in the data portion of the IP datagram.

netgate-packet-trace:identification
integer <int32>

The identifcation field was used experimentally for fragmentation grouping.

netgate-packet-trace:dscp
integer <int32>

Formerly called the ToS field, this is the differentiated services (DiffServ) code.

netgate-packet-trace:destination-ip-prefix
string

The destination IPv4 address and prefix mask length.

netgate-packet-trace:checksum
integer <int32>

The checksum field is used for error-checking the packet.

netgate-packet-trace:source-ip-prefix
string

The source IPv4 address and prefix mask length.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:fragmentation-offset": 0,
  • "netgate-packet-trace:flags": "string",
  • "netgate-packet-trace:length": 0,
  • "netgate-packet-trace:ihl": 0,
  • "netgate-packet-trace:ttl": 0,
  • "netgate-packet-trace:version": 0,
  • "netgate-packet-trace:ecn": 0,
  • "netgate-packet-trace:protocol": 0,
  • "netgate-packet-trace:identification": 0,
  • "netgate-packet-trace:dscp": 0,
  • "netgate-packet-trace:destination-ip-prefix": "string",
  • "netgate-packet-trace:checksum": 0,
  • "netgate-packet-trace:source-ip-prefix": "string"
}

creates or updates netgate.packet.fields.L3Ip4

L3 IPv4 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L3Ip4 to be added or updated

object (netgate.packet.fields.L3Ip4)

This group describes the fields of an IPv4 packet.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:ipv4": {
    }
}

removes netgate.packet.fields.L3Ip4

L3 IPv4 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l3/ipv4"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.fields.L3Ip6

L3 IPv6 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l3/ipv6"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:ipv6": {
    }
}

creates netgate.packet.fields.L3Ip6

L3 IPv6 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L3Ip6 to be added to list

netgate-packet-trace:hop-limit
integer <int32>

The maximum forwarding count before a packet is dropped.

netgate-packet-trace:destination-prefix
string

The destination IPv6 address and prefix mask length.

netgate-packet-trace:source-prefix
string

The source IPv6 address and prefix mask length.

netgate-packet-trace:traffic-class
integer <int32>

The combined differentiated services field in the high 6 bits and the Explicit Congestion Notification (ECN) in the low 2 bits.

netgate-packet-trace:flow-label
integer <int64>

The 20-bit flow identifier value.

netgate-packet-trace:payload-length
integer <int32>

The length of the payload in octets.

netgate-packet-trace:version
integer <int32>

For IPv6, this field should be 6.

netgate-packet-trace:next-header
integer <int32>

The protocol type of the next header.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:hop-limit": 0,
  • "netgate-packet-trace:destination-prefix": "string",
  • "netgate-packet-trace:source-prefix": "string",
  • "netgate-packet-trace:traffic-class": 0,
  • "netgate-packet-trace:flow-label": 0,
  • "netgate-packet-trace:payload-length": 0,
  • "netgate-packet-trace:version": 0,
  • "netgate-packet-trace:next-header": 0
}

creates or updates netgate.packet.fields.L3Ip6

L3 IPv6 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L3Ip6 to be added or updated

object (netgate.packet.fields.L3Ip6)

This group describes the fields of an IPv6 packet.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:ipv6": {
    }
}

removes netgate.packet.fields.L3Ip6

L3 IPv6 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l3/ipv6"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.trace.packettraceconfig.filters.filter.match.L4

L4 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l4"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:l4": {
    }
}

creates netgate.packet.trace.packettraceconfig.filters.filter.match.L4

L4 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.filter.match.L4 to be added to list

object (netgate.packet.fields.L4Tcp)

This data describrs the fields of a L4 UDP packet.

object (netgate.packet.fields.L4Udp)

This data describrs the fields of a L4 UDP packet.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:tcp": {
    },
  • "netgate-packet-trace:udp": {
    }
}

creates or updates netgate.packet.trace.packettraceconfig.filters.filter.match.L4

L4 fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.trace.packettraceconfig.filters.filter.match.L4 to be added or updated

object (netgate.packet.trace.packettraceconfig.filters.filter.match.L4)

L4 fields

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:l4": {
    }
}

removes netgate.packet.trace.packettraceconfig.filters.filter.match.L4

L4 fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l4"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.fields.L4Tcp

L4 TCP fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l4/tcp"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:tcp": {
    }
}

creates netgate.packet.fields.L4Tcp

L4 TCP fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L4Tcp to be added to list

netgate-packet-trace:source-port
integer <int32>

The source port.

netgate-packet-trace:acknowledgement-number
integer <int32>

Acknowledgement number within the session.

netgate-packet-trace:destination-port
integer <int32>

The destination port.

netgate-packet-trace:checksum
integer <int32>

The checksum of the packet.

netgate-packet-trace:flags
string
netgate-packet-trace:sequence-number
integer <int32>

Sequence number within the session.

netgate-packet-trace:data-offset
integer <int32>

The size of the TCP header in 32-bit words.

netgate-packet-trace:window
integer <int32>

The receive window size.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:source-port": 0,
  • "netgate-packet-trace:acknowledgement-number": 0,
  • "netgate-packet-trace:destination-port": 0,
  • "netgate-packet-trace:checksum": 0,
  • "netgate-packet-trace:flags": "string",
  • "netgate-packet-trace:sequence-number": 0,
  • "netgate-packet-trace:data-offset": 0,
  • "netgate-packet-trace:window": 0
}

creates or updates netgate.packet.fields.L4Tcp

L4 TCP fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L4Tcp to be added or updated

object (netgate.packet.fields.L4Tcp)

This data describrs the fields of a L4 UDP packet.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:tcp": {
    }
}

removes netgate.packet.fields.L4Tcp

L4 TCP fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l4/tcp"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.packet.fields.L4Udp

L4 UDP fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l4/udp"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:udp": {
    }
}

creates netgate.packet.fields.L4Udp

L4 UDP fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L4Udp to be added to list

netgate-packet-trace:checksum
integer <int32>

The checksum of the packet.

netgate-packet-trace:length
integer <int32>

The length of the packet in bytes.

netgate-packet-trace:source-port
integer <int32>

The source port.

netgate-packet-trace:destination-port
integer <int32>

The destination port.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:checksum": 0,
  • "netgate-packet-trace:length": 0,
  • "netgate-packet-trace:source-port": 0,
  • "netgate-packet-trace:destination-port": 0
}

creates or updates netgate.packet.fields.L4Udp

L4 UDP fields

path Parameters
name
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.packet.fields.L4Udp to be added or updated

object (netgate.packet.fields.L4Udp)

This data describrs the fields of a L4 UDP packet.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-packet-trace:udp": {
    }
}

removes netgate.packet.fields.L4Udp

L4 UDP fields

path Parameters
name
required
string

Id of filter

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-packet-trace:packet-trace-config/filters/filter=%7Bname%7D/match/l4/udp"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}