Documentation
¶
Index ¶
- Constants
- Variables
- func Analyze(msg *types.SIP)
- func Parse(data []byte, tcp bool) (*layers.SIP, int, error)
- func Record(sip *layers.SIP, timestamp int64) *types.SIP
- type AssociationCoverage
- type Associations
- func (a *Associations) Coverage() AssociationCoverage
- func (a *Associations) Lookup(scope, src, dst string, sport, dport int32, pt uint32, at int64) (string, Codec, bool)
- func (a *Associations) Observe(s *types.SIP)
- func (a *Associations) Qualification(at int64) string
- func (a *Associations) Reset()
- type Codec
Constants ¶
const CapacityLoss = "sip-association-capacity; RTP candidate only, association unavailable"
const MaxBody = 256 << 10
const MaxHeader = 32 << 10
Variables ¶
var ErrIncomplete = errors.New("incomplete SIP message")
var ErrMalformed = errors.New("malformed SIP message")
var Media = NewAssociations()
Functions ¶
Types ¶
type AssociationCoverage ¶
type AssociationCoverage struct {
Status string `json:"status"`
Policy string `json:"policy"`
LimitBytes int `json:"limitBytes"`
RetainedBytes int `json:"retainedBytes"`
RetainedCalls int `json:"retainedCalls"`
RetainedDescriptions int `json:"retainedDescriptions"`
RejectedDescriptions uint64 `json:"rejectedDescriptions"`
UntrustedFrom int64 `json:"untrustedFromNs"`
}
type Associations ¶
type Associations struct {
// contains filtered or unexported fields
}
Associations stores signaling metadata only. Capture-time intervals, rather than arrival order or wall time, also support UDP replay after TCP readers drain.
func NewAssociations ¶
func NewAssociations() *Associations
func NewAssociationsWithBudget ¶
func NewAssociationsWithBudget(bytes int) *Associations
NewAssociationsWithBudget bounds retained signaling metadata, never packet buffers.
func (*Associations) Coverage ¶
func (a *Associations) Coverage() AssociationCoverage
func (*Associations) Lookup ¶
func (a *Associations) Lookup(scope, src, dst string, sport, dport int32, pt uint32, at int64) (string, Codec, bool)
Lookup requires both advertised endpoints and a matching offer/answer codec. Ambiguous overlapping calls fail closed; NAT port guessing is not performed.
func (*Associations) Observe ¶
func (a *Associations) Observe(s *types.SIP)
func (*Associations) Qualification ¶
func (a *Associations) Qualification(at int64) string
func (*Associations) Reset ¶
func (a *Associations) Reset()