mirror of
https://github.com/gortc/stun.git
synced 2025-12-24 12:57:54 +08:00
all: update godoc references to RFC
This commit is contained in:
4
addr.go
4
addr.go
@@ -12,7 +12,7 @@ import (
|
||||
// This attribute is used only by servers for achieving backwards
|
||||
// compatibility with RFC 3489 clients.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.1
|
||||
// RFC 5389 Section 15.1
|
||||
type MappedAddress struct {
|
||||
IP net.IP
|
||||
Port int
|
||||
@@ -20,7 +20,7 @@ type MappedAddress struct {
|
||||
|
||||
// AlternateServer represents ALTERNATE-SERVER attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.11
|
||||
// RFC 5389 Section 15.11
|
||||
type AlternateServer struct {
|
||||
IP net.IP
|
||||
Port int
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
// ErrorCodeAttribute represents ERROR-CODE attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.6
|
||||
// RFC 5389 Section 15.6
|
||||
type ErrorCodeAttribute struct {
|
||||
Code ErrorCode
|
||||
Reason []byte
|
||||
@@ -100,7 +100,7 @@ const (
|
||||
|
||||
// Error codes from RFC 5766.
|
||||
//
|
||||
// https://trac.tools.ietf.org/html/rfc5766#section-15
|
||||
// RFC 5766 Section 15
|
||||
const (
|
||||
CodeForbidden ErrorCode = 403 // Forbidden
|
||||
CodeAllocMismatch ErrorCode = 437 // Allocation Mismatch
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
// FingerprintAttr represents FINGERPRINT attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.5
|
||||
// RFC 5389 Section 15.5
|
||||
type FingerprintAttr byte
|
||||
|
||||
// CRCMismatch represents CRC check error.
|
||||
|
||||
@@ -40,7 +40,7 @@ func NewShortTermIntegrity(password string) MessageIntegrity {
|
||||
// version of MessageIntegrity is not implemented. Implementation and changes
|
||||
// to it is subject to security review.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.4
|
||||
// RFC 5389 Section 15.4
|
||||
type MessageIntegrity []byte
|
||||
|
||||
// ErrFingerprintBeforeIntegrity means that FINGEPRINT attribute is already in
|
||||
|
||||
@@ -7,7 +7,7 @@ func NewUsername(username string) Username {
|
||||
|
||||
// Username represents USERNAME attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.3
|
||||
// RFC 5389 Section 15.3
|
||||
type Username []byte
|
||||
|
||||
func (u Username) String() string {
|
||||
@@ -34,7 +34,7 @@ func NewRealm(realm string) Realm {
|
||||
|
||||
// Realm represents REALM attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.7
|
||||
// RFC 5389 Section 15.7
|
||||
type Realm []byte
|
||||
|
||||
func (n Realm) String() string {
|
||||
@@ -57,7 +57,7 @@ const softwareRawMaxB = 763
|
||||
|
||||
// Software is SOFTWARE attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.10
|
||||
// RFC 5389 Section 15.10
|
||||
type Software []byte
|
||||
|
||||
func (s Software) String() string {
|
||||
@@ -81,7 +81,7 @@ func (s *Software) GetFrom(m *Message) error {
|
||||
|
||||
// Nonce represents NONCE attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.8
|
||||
// RFC 5389 Section 15.8
|
||||
type Nonce []byte
|
||||
|
||||
// NewNonce returns new Nonce from string.
|
||||
|
||||
@@ -4,7 +4,7 @@ import "errors"
|
||||
|
||||
// UnknownAttributes represents UNKNOWN-ATTRIBUTES attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.9
|
||||
// RFC 5389 Section 15.9
|
||||
type UnknownAttributes []AttrType
|
||||
|
||||
func (a UnknownAttributes) String() string {
|
||||
|
||||
@@ -15,7 +15,7 @@ const (
|
||||
|
||||
// XORMappedAddress implements XOR-MAPPED-ADDRESS attribute.
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5389#section-15.2
|
||||
// RFC 5389 Section 15.2
|
||||
type XORMappedAddress struct {
|
||||
IP net.IP
|
||||
Port int
|
||||
|
||||
Reference in New Issue
Block a user