Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions diam/applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const (
BASE_ACCOUNTING_APP_ID = 3
CHARGING_CONTROL_APP_ID = 4
TGPP_APP_ID = 4
TGPP_CX_APP_ID = 16777216
RX_APP_ID = 16777236
GX_CHARGING_CONTROL_APP_ID = 16777238
TGPP_S6A_APP_ID = 16777251
TGPP_SWX_APP_ID = 16777265
Expand Down
10 changes: 6 additions & 4 deletions diam/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ cat $dict | "$SED" \
-ne 's/.*command code="\(.*\)" .* name="\(.*\)".*/\2 = \1/p' \
| sort -u >> $src

echo ')\n// Short Command Names\nconst (\n' >> $src
echo -e ')\n// Short Command Names\nconst (\n' >> $src

cat $dict | "$SED" \
-e 's/-//g' \
-ne 's/.*command code="[0-9]*".*\s.*short="\([^"]*\).*/\1R = "\1R"\n\1A = "\1A"/p' \
| sort -u >> $src

echo ')' >> $src
echo -e ')' >> $src
go fmt $src

## Generate applications.go
Expand All @@ -81,7 +81,7 @@ cat $dict | "$SED" \
-ne 's/\s*<application\s*id="\([0-9]*\)".*name="\(.*\)".*/\U\2_APP_ID = \1/p' \
| sort -u | sort -nk 3 >> $src

echo ')\n' >> $src
echo -e ')\n' >> $src
go fmt $src

## Generate avp/codes.go
Expand All @@ -106,7 +106,7 @@ cat $dict | "$SED" \
-ne 's/.*avp name="\(.*\)" code="\([0-9]*\)".*/\1 = \2/p' \
| LC_COLLATE=C sort -u $SORT_FLAG_IGNORE_CASE >> $src

echo ')\n' >> $src
echo -e ')\n' >> $src

go fmt $src

Expand Down Expand Up @@ -139,6 +139,8 @@ func init() {
{"Gx Charging Control", gxcreditcontrolXML},
{"Network Access Server", networkaccessserverXML},
{"TGPP", tgpprorfXML},
{"TGPP_Rx", tgpprxXML},
{"TGPP_Cx", tgppcxXML},
{"TGPP_S6a", tgpps6aXML},
{"TGPP_Swx", tgppswxXML},
}
Expand Down
6 changes: 3 additions & 3 deletions diam/avp.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"errors"
"fmt"

"github.com/fiorix/go-diameter/v4/diam/avp"
"github.com/fiorix/go-diameter/v4/diam/datatype"
"github.com/fiorix/go-diameter/v4/diam/dict"
"github.com/rakeshgmtke/go-diameter/diam/avp"
"github.com/rakeshgmtke/go-diameter/diam/datatype"
"github.com/rakeshgmtke/go-diameter/diam/dict"
)

// AVP is a Diameter attribute-value-pair.
Expand Down
441 changes: 277 additions & 164 deletions diam/avp/codes.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions diam/avp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"encoding/hex"
"testing"

"github.com/fiorix/go-diameter/v4/diam/avp"
"github.com/fiorix/go-diameter/v4/diam/datatype"
"github.com/fiorix/go-diameter/v4/diam/dict"
"github.com/rakeshgmtke/go-diameter/diam/avp"
"github.com/rakeshgmtke/go-diameter/diam/datatype"
"github.com/rakeshgmtke/go-diameter/diam/dict"
)

var testAVP = [][]byte{ // Body of a CER message
Expand Down
2 changes: 1 addition & 1 deletion diam/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net"
"time"

"github.com/fiorix/go-diameter/v4/diam/dict"
"github.com/rakeshgmtke/go-diameter/diam/dict"
)

// DialNetwork connects to the peer pointed to by network & addr and returns the Conn that
Expand Down
10 changes: 10 additions & 0 deletions diam/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ const (
DeviceWatchdog = 280
DisconnectPeer = 282
InsertSubscriberData = 319
LocationInfo = 302
MultimediaAuth = 303
MultimediaAuthentication = 303
Notify = 323
PurgeUE = 321
PushProfile = 305
ReAuth = 258
RegistrationTermination = 304
Reset = 322
ServerAssignment = 301
SessionTermination = 275
SpendingLimit = 8388635
UpdateLocation = 316
UserAuthorization = 300
)

// Short Command Names
Expand All @@ -52,10 +56,14 @@ const (
DWR = "DWR"
IDA = "IDA"
IDR = "IDR"
LIA = "LIA"
LIR = "LIR"
MAA = "MAA"
MAR = "MAR"
NOA = "NOA"
NOR = "NOR"
PPA = "PPA"
PPR = "PPR"
PUA = "PUA"
PUR = "PUR"
RAA = "RAA"
Expand All @@ -70,6 +78,8 @@ const (
SLR = "SLR"
STA = "STA"
STR = "STR"
UAA = "UAA"
UAR = "UAR"
ULA = "ULA"
ULR = "ULR"
)
4 changes: 2 additions & 2 deletions diam/diamtest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"fmt"
"net"

"github.com/fiorix/go-diameter/v4/diam"
"github.com/fiorix/go-diameter/v4/diam/dict"
"github.com/rakeshgmtke/go-diameter/diam"
"github.com/rakeshgmtke/go-diameter/diam/dict"
)

// A Server is a Diameter server listening on a system-chosen port on the
Expand Down
Loading