Skip to content

Commit

Permalink
Merge pull request wmnsk#47 from badhrinathpa/master
Browse files Browse the repository at this point in the history
fix pfcp association sequence number
  • Loading branch information
wmnsk authored Aug 10, 2020
2 parents 99a4fae + 021aa72 commit 208f6e0
Show file tree
Hide file tree
Showing 32 changed files with 64 additions and 57 deletions.
2 changes: 2 additions & 0 deletions examples/heartbeat/hb-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ func main() {
log.Fatal(err)
}

var seq uint32 = 1
hbreq, err := message.NewHeartbeatRequest(
seq,
ie.NewRecoveryTimeStamp(time.Now()),
ie.NewSourceIPAddress(net.ParseIP("127.0.0.1"), net.ParseIP("2001::1"), 0),
).Marshal()
Expand Down
3 changes: 2 additions & 1 deletion examples/heartbeat/hb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ func main() {
}

// Timestamp shouldn't be the time message is sent in the real deployment but anyway :D
hbres, err := message.NewHeartbeatResponse(ie.NewRecoveryTimeStamp(time.Now())).Marshal()
var seq uint32 = 1
hbres, err := message.NewHeartbeatResponse(seq, ie.NewRecoveryTimeStamp(time.Now())).Marshal()
if err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions message/association-release-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type AssociationReleaseRequest struct {
}

// NewAssociationReleaseRequest creates a new AssociationReleaseRequest.
func NewAssociationReleaseRequest(id *ie.IE, ies ...*ie.IE) *AssociationReleaseRequest {
func NewAssociationReleaseRequest(seq uint32, id *ie.IE, ies ...*ie.IE) *AssociationReleaseRequest {
m := &AssociationReleaseRequest{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeAssociationReleaseRequest, 0, 0, 0,
MsgTypeAssociationReleaseRequest, 0, seq, 0,
nil,
),
NodeID: id,
Expand Down
4 changes: 2 additions & 2 deletions message/association-release-request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ func TestAssociationReleaseRequest(t *testing.T) {
{
Description: "Normal",
Structured: message.NewAssociationReleaseRequest(
ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
seq, ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
),
Serialized: []byte{
0x20, 0x09, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00,
0x20, 0x09, 0x00, 0x25, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3c, 0x00, 0x1d, 0x02, 0x07, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x03, 0x65, 0x70, 0x63, 0x0b, 0x33, 0x67, 0x70, 0x70, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x03, 0x6f, 0x72, 0x67,
},
},
Expand Down
4 changes: 2 additions & 2 deletions message/association-release-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ type AssociationReleaseResponse struct {
}

// NewAssociationReleaseResponse creates a new AssociationReleaseResponse.
func NewAssociationReleaseResponse(id, cause *ie.IE, ies ...*ie.IE) *AssociationReleaseResponse {
func NewAssociationReleaseResponse(seq uint32, id, cause *ie.IE, ies ...*ie.IE) *AssociationReleaseResponse {
m := &AssociationReleaseResponse{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeAssociationReleaseResponse, 0, 0, 0,
MsgTypeAssociationReleaseResponse, 0, seq, 0,
nil,
),
NodeID: id,
Expand Down
4 changes: 2 additions & 2 deletions message/association-release-response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ func TestAssociationReleaseResponse(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewAssociationReleaseResponse(
Structured: message.NewAssociationReleaseResponse(seq,
ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
ie.NewCause(ie.CauseRequestAccepted),
),
Serialized: []byte{
0x20, 0x0a, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00,
0x20, 0x0a, 0x00, 0x2a, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3c, 0x00, 0x1d, 0x02, 0x07, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x03, 0x65, 0x70, 0x63, 0x0b, 0x33, 0x67, 0x70, 0x70, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x03, 0x6f, 0x72, 0x67,
0x00, 0x13, 0x00, 0x01, 0x01,
},
Expand Down
4 changes: 2 additions & 2 deletions message/association-setup-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ type AssociationSetupRequest struct {
}

// NewAssociationSetupRequest creates a new AssociationSetupRequest.
func NewAssociationSetupRequest(ies ...*ie.IE) *AssociationSetupRequest {
func NewAssociationSetupRequest(seq uint32, ies ...*ie.IE) *AssociationSetupRequest {
m := &AssociationSetupRequest{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeAssociationSetupRequest, 0, 0, 0,
MsgTypeAssociationSetupRequest, 0, seq, 0,
nil,
),
}
Expand Down
4 changes: 2 additions & 2 deletions message/association-setup-request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestAssociationSetupRequest(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewAssociationSetupRequest(
Structured: message.NewAssociationSetupRequest(seq,
ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
ie.NewRecoveryTimeStamp(time.Date(2019, time.January, 1, 0, 0, 0, 0, time.UTC)),
ie.NewUPFunctionFeatures(0x01, 0x02),
Expand Down Expand Up @@ -53,7 +53,7 @@ func TestAssociationSetupRequest(t *testing.T) {
ie.NewNFInstanceID([]byte{0x11, 0x11, 0x11, 0x11, 0x22, 0x22, 0x22, 0x22, 0x33, 0x33, 0x33, 0x33, 0x44, 0x44, 0x44, 0x44}),
),
Serialized: []byte{
0x20, 0x05, 0x01, 0x36, 0x00, 0x00, 0x00, 0x00,
0x20, 0x05, 0x01, 0x36, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3c, 0x00, 0x1d, 0x02, 0x07, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x03, 0x65, 0x70, 0x63, 0x0b, 0x33, 0x67, 0x70, 0x70, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x03, 0x6f, 0x72, 0x67,
0x00, 0x60, 0x00, 0x04, 0xdf, 0xd5, 0x2c, 0x00,
0x00, 0x2b, 0x00, 0x02, 0x01, 0x02,
Expand Down
4 changes: 2 additions & 2 deletions message/association-setup-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ type AssociationSetupResponse struct {
}

// NewAssociationSetupResponse creates a new AssociationSetupResponse.
func NewAssociationSetupResponse(ies ...*ie.IE) *AssociationSetupResponse {
func NewAssociationSetupResponse(seq uint32, ies ...*ie.IE) *AssociationSetupResponse {
m := &AssociationSetupResponse{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeAssociationSetupResponse, 0, 0, 0,
MsgTypeAssociationSetupResponse, 0, seq, 0,
nil,
),
}
Expand Down
3 changes: 2 additions & 1 deletion message/association-setup-response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestAssociationSetupResponse(t *testing.T) {
{
Description: "Normal",
Structured: message.NewAssociationSetupResponse(
seq,
ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
ie.NewCause(ie.CauseRequestAccepted),
ie.NewRecoveryTimeStamp(time.Date(2019, time.January, 1, 0, 0, 0, 0, time.UTC)),
Expand Down Expand Up @@ -51,7 +52,7 @@ func TestAssociationSetupResponse(t *testing.T) {
ie.NewNFInstanceID([]byte{0x11, 0x11, 0x11, 0x11, 0x22, 0x22, 0x22, 0x22, 0x33, 0x33, 0x33, 0x33, 0x44, 0x44, 0x44, 0x44}),
),
Serialized: []byte{
0x20, 0x06, 0x01, 0x13, 0x00, 0x00, 0x00, 0x00,
0x20, 0x06, 0x01, 0x13, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3c, 0x00, 0x1d, 0x02, 0x07, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x03, 0x65, 0x70, 0x63, 0x0b, 0x33, 0x67, 0x70, 0x70, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x03, 0x6f, 0x72, 0x67,
0x00, 0x13, 0x00, 0x01, 0x01,
0x00, 0x60, 0x00, 0x04, 0xdf, 0xd5, 0x2c, 0x00,
Expand Down
4 changes: 2 additions & 2 deletions message/association-update-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ type AssociationUpdateRequest struct {
}

// NewAssociationUpdateRequest creates a new AssociationUpdateRequest.
func NewAssociationUpdateRequest(ies ...*ie.IE) *AssociationUpdateRequest {
func NewAssociationUpdateRequest(seq uint32, ies ...*ie.IE) *AssociationUpdateRequest {
m := &AssociationUpdateRequest{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeAssociationUpdateRequest, 0, 0, 0,
MsgTypeAssociationUpdateRequest, 0, seq, 0,
nil,
),
}
Expand Down
4 changes: 2 additions & 2 deletions message/association-update-request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestAssociationUpdateRequest(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewAssociationUpdateRequest(
Structured: message.NewAssociationUpdateRequest(seq,
ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
ie.NewUPFunctionFeatures(0x01, 0x02),
ie.NewCPFunctionFeatures(0x3f),
Expand Down Expand Up @@ -50,7 +50,7 @@ func TestAssociationUpdateRequest(t *testing.T) {
),
),
Serialized: []byte{
0x20, 0x07, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00,
0x20, 0x07, 0x00, 0xfc, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3c, 0x00, 0x1d, 0x02, 0x07, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x03, 0x65, 0x70, 0x63, 0x0b, 0x33, 0x67, 0x70, 0x70, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x03, 0x6f, 0x72, 0x67,
0x00, 0x2b, 0x00, 0x02, 0x01, 0x02,
0x00, 0x59, 0x00, 0x01, 0x3f,
Expand Down
4 changes: 2 additions & 2 deletions message/association-update-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ type AssociationUpdateResponse struct {
}

// NewAssociationUpdateResponse creates a new AssociationUpdateResponse.
func NewAssociationUpdateResponse(ies ...*ie.IE) *AssociationUpdateResponse {
func NewAssociationUpdateResponse(seq uint32, ies ...*ie.IE) *AssociationUpdateResponse {
m := &AssociationUpdateResponse{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeAssociationUpdateResponse, 0, 0, 0,
MsgTypeAssociationUpdateResponse, 0, seq, 0,
nil,
),
}
Expand Down
4 changes: 2 additions & 2 deletions message/association-update-response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ func TestAssociationUpdateResponse(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewAssociationUpdateResponse(
Structured: message.NewAssociationUpdateResponse(seq,
ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
ie.NewCause(ie.CauseRequestAccepted),
ie.NewUPFunctionFeatures(0x01, 0x02),
ie.NewCPFunctionFeatures(0x3f),
),
Serialized: []byte{
0x20, 0x08, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00,
0x20, 0x08, 0x00, 0x35, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3c, 0x00, 0x1d, 0x02, 0x07, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x03, 0x65, 0x70, 0x63, 0x0b, 0x33, 0x67, 0x70, 0x70, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x03, 0x6f, 0x72, 0x67,
0x00, 0x13, 0x00, 0x01, 0x01,
0x00, 0x2b, 0x00, 0x02, 0x01, 0x02,
Expand Down
4 changes: 2 additions & 2 deletions message/heartbeat-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ type HeartbeatRequest struct {
}

// NewHeartbeatRequest creates a new HeartbeatRequest.
func NewHeartbeatRequest(ts, ip *ie.IE, ies ...*ie.IE) *HeartbeatRequest {
func NewHeartbeatRequest(seq uint32, ts, ip *ie.IE, ies ...*ie.IE) *HeartbeatRequest {
m := &HeartbeatRequest{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeHeartbeatRequest, 0, 0, 0,
MsgTypeHeartbeatRequest, 0, seq, 0,
nil,
),
RecoveryTimeStamp: ts,
Expand Down
4 changes: 2 additions & 2 deletions message/heartbeat-request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ func TestHeartbeatRequest(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewHeartbeatRequest(
Structured: message.NewHeartbeatRequest(seq,
ie.NewRecoveryTimeStamp(time.Date(2019, time.January, 1, 0, 0, 0, 0, time.UTC)),
ie.NewSourceIPAddress(net.ParseIP("127.0.0.1"), net.ParseIP("2001::1"), 0),
),
Serialized: []byte{
0x20, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00,
0x20, 0x01, 0x00, 0x25, 0x11, 0x22, 0x33, 0x00,
0x00, 0x60, 0x00, 0x04, 0xdf, 0xd5, 0x2c, 0x00,
0x00, 0xc0, 0x00, 0x15,
0x03,
Expand Down
4 changes: 2 additions & 2 deletions message/heartbeat-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type HeartbeatResponse struct {
}

// NewHeartbeatResponse creates a new HeartbeatResponse.
func NewHeartbeatResponse(ts *ie.IE, ies ...*ie.IE) *HeartbeatResponse {
func NewHeartbeatResponse(seq uint32, ts *ie.IE, ies ...*ie.IE) *HeartbeatResponse {
m := &HeartbeatResponse{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeHeartbeatResponse, 0, 0, 0,
MsgTypeHeartbeatResponse, 0, seq, 0,
nil,
),
RecoveryTimeStamp: ts,
Expand Down
4 changes: 2 additions & 2 deletions message/heartbeat-response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ func TestHeartbeatResponse(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewHeartbeatResponse(
Structured: message.NewHeartbeatResponse(seq,
ie.NewRecoveryTimeStamp(time.Date(2019, time.January, 1, 0, 0, 0, 0, time.UTC)),
),
Serialized: []byte{
0x20, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
0x20, 0x02, 0x00, 0x0c, 0x11, 0x22, 0x33, 0x00,
0x00, 0x60, 0x00, 0x04, 0xdf, 0xd5, 0x2c, 0x00,
},
},
Expand Down
4 changes: 2 additions & 2 deletions message/node-report-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ type NodeReportRequest struct {
}

// NewNodeReportRequest creates a new NodeReportRequest.
func NewNodeReportRequest(ies ...*ie.IE) *NodeReportRequest {
func NewNodeReportRequest(seq uint32, ies ...*ie.IE) *NodeReportRequest {
m := &NodeReportRequest{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeNodeReportRequest, 0, 0, 0,
MsgTypeNodeReportRequest, 0, seq, 0,
nil,
),
}
Expand Down
4 changes: 2 additions & 2 deletions message/node-report-request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestNodeReportRequest(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewNodeReportRequest(
Structured: message.NewNodeReportRequest(seq,
ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
ie.NewNodeReportType(0x01),
ie.NewUserPlanePathFailureReport(
Expand Down Expand Up @@ -48,7 +48,7 @@ func TestNodeReportRequest(t *testing.T) {
),
),
Serialized: []byte{
0x20, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x0c, 0x01, 0x00, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3c, 0x00, 0x1d, 0x02, 0x07, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x03, 0x65, 0x70, 0x63, 0x0b, 0x33, 0x67, 0x70, 0x70, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x03, 0x6f, 0x72, 0x67,
0x00, 0x65, 0x00, 0x01, 0x01,
0x00, 0x66, 0x00, 0x23,
Expand Down
4 changes: 2 additions & 2 deletions message/node-report-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ type NodeReportResponse struct {
}

// NewNodeReportResponse creates a new NodeReportResponse.
func NewNodeReportResponse(id, cause, offending *ie.IE, ies ...*ie.IE) *NodeReportResponse {
func NewNodeReportResponse(seq uint32, id, cause, offending *ie.IE, ies ...*ie.IE) *NodeReportResponse {
m := &NodeReportResponse{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeNodeReportResponse, 0, 0, 0,
MsgTypeNodeReportResponse, 0, seq, 0,
nil,
),
NodeID: id,
Expand Down
4 changes: 2 additions & 2 deletions message/node-report-response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ func TestNodeReportResponse(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewNodeReportResponse(
Structured: message.NewNodeReportResponse(seq,
ie.NewNodeID("", "", "go-pfcp.epc.3gppnetwork.org"),
ie.NewCause(ie.CauseRequestAccepted),
ie.NewOffendingIE(ie.Cause),
),
Serialized: []byte{
0x20, 0x0d, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
0x20, 0x0d, 0x00, 0x30, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3c, 0x00, 0x1d, 0x02, 0x07, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x03, 0x65, 0x70, 0x63, 0x0b, 0x33, 0x67, 0x70, 0x70, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x03, 0x6f, 0x72, 0x67,
0x00, 0x13, 0x00, 0x01, 0x01,
0x00, 0x28, 0x00, 0x02, 0x00, 0x13,
Expand Down
4 changes: 2 additions & 2 deletions message/pfd-management-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type PFDManagementRequest struct {
}

// NewPFDManagementRequest creates a new PFDManagementRequest.
func NewPFDManagementRequest(app *ie.IE, ies ...*ie.IE) *PFDManagementRequest {
func NewPFDManagementRequest(seq uint32, app *ie.IE, ies ...*ie.IE) *PFDManagementRequest {
m := &PFDManagementRequest{
Header: NewHeader(
1, 0, 0, 0,
MsgTypePFDManagementRequest, 0, 0, 0,
MsgTypePFDManagementRequest, 0, seq, 0,
nil,
),
ApplicationIDsPFDs: app,
Expand Down
4 changes: 2 additions & 2 deletions message/pfd-management-request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestPFDManagementRequest(t *testing.T) {
cases := []testutil.TestCase{
{
Description: "Normal",
Structured: message.NewPFDManagementRequest(
Structured: message.NewPFDManagementRequest(seq,
ie.NewApplicationIDsPFDs(
ie.NewApplicationID("https://github.com/wmnsk/go-pfcp/"),
ie.NewPFDContext(
Expand All @@ -26,7 +26,7 @@ func TestPFDManagementRequest(t *testing.T) {
),
),
Serialized: []byte{
0x20, 0x03, 0x00, 0x69, 0x00, 0x00, 0x00, 0x00,
0x20, 0x03, 0x00, 0x69, 0x11, 0x22, 0x33, 0x00,
0x00, 0x3a, 0x00, 0x61,
// ApplicationID
0x00, 0x18, 0x00, 0x21, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x6d, 0x6e, 0x73, 0x6b, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x66, 0x63, 0x70, 0x2f,
Expand Down
4 changes: 2 additions & 2 deletions message/pfd-management-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ type PFDManagementResponse struct {
}

// NewPFDManagementResponse creates a new PFDManagementResponse.
func NewPFDManagementResponse(cause, offending *ie.IE, ies ...*ie.IE) *PFDManagementResponse {
func NewPFDManagementResponse(seq uint32, cause, offending *ie.IE, ies ...*ie.IE) *PFDManagementResponse {
m := &PFDManagementResponse{
Header: NewHeader(
1, 0, 0, 0,
MsgTypePFDManagementResponse, 0, 0, 0,
MsgTypePFDManagementResponse, 0, seq, 0,
nil,
),
Cause: cause,
Expand Down
3 changes: 2 additions & 1 deletion message/pfd-management-response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ func TestPFDManagementResponse(t *testing.T) {
{
Description: "Normal",
Structured: message.NewPFDManagementResponse(
seq,
ie.NewCause(ie.CauseRequestAccepted),
ie.NewOffendingIE(ie.Cause),
),
Serialized: []byte{
0x20, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x20, 0x04, 0x00, 0x0f, 0x11, 0x22, 0x33, 0x00,
0x00, 0x13, 0x00, 0x01, 0x01,
0x00, 0x28, 0x00, 0x02, 0x00, 0x13,
},
Expand Down
4 changes: 2 additions & 2 deletions message/session-set-deletion-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ type SessionSetDeletionRequest struct {
}

// NewSessionSetDeletionRequest creates a new SessionSetDeletionRequest.
func NewSessionSetDeletionRequest(id, csid *ie.IE, ies ...*ie.IE) *SessionSetDeletionRequest {
func NewSessionSetDeletionRequest(seq uint32, id, csid *ie.IE, ies ...*ie.IE) *SessionSetDeletionRequest {
m := &SessionSetDeletionRequest{
Header: NewHeader(
1, 0, 0, 0,
MsgTypeSessionSetDeletionRequest, 0, 0, 0,
MsgTypeSessionSetDeletionRequest, 0, seq, 0,
nil,
),
NodeID: id,
Expand Down
Loading

0 comments on commit 208f6e0

Please sign in to comment.