diff --git a/internal/pfcp/dispacher.go b/internal/pfcp/dispacher.go index 0032d72..76f8f14 100644 --- a/internal/pfcp/dispacher.go +++ b/internal/pfcp/dispacher.go @@ -27,6 +27,8 @@ func (s *PfcpServer) dispacher(buf []byte, addr net.Addr) error { s.handleSessionModificationRequest(msg, addr) case *message.SessionDeletionRequest: s.handleSessionDeletionRequest(msg, addr) + case *message.SessionReportResponse: + s.handleSessionReportResponse(msg, addr) default: return errors.Errorf("pfcp dispacher unknown msg type: %d", msgtmp.MessageType()) } diff --git a/internal/pfcp/session.go b/internal/pfcp/session.go index 1954e56..55b5893 100644 --- a/internal/pfcp/session.go +++ b/internal/pfcp/session.go @@ -251,3 +251,29 @@ func (s *PfcpServer) handleSessionDeletionRequest(req *message.SessionDeletionRe return } } + +func (s *PfcpServer) handleSessionReportResponse(rsp *message.SessionReportResponse, addr net.Addr) { + s.log.Infoln("handleSessionReportResponse") + + var nodeid string + if raddr, ok := addr.(*net.UDPAddr); ok { + nodeid = raddr.IP.String() + } + s.log.Debugf("nodeid: %v\n", nodeid) + + node, ok := s.nodes[nodeid] + if !ok { + s.log.Errorf("not found NodeID %v\n", nodeid) + return + } + + s.log.Debugf("seid: %v\n", rsp.Header.SEID) + + sess, err := node.Sess(rsp.Header.SEID) + if err != nil { + node.log.Errorln(err) + return + } + + s.log.Debugf("sess: %#+v\n", sess) +}