All Projects → rs → tzsp

rs / tzsp

Licence: BSD-3-Clause License
TaZmen Sniffer Protocol (TZSP) parser in Go

Programming Languages

go
31211 projects - #10 most used programming language

TaZmen Sniffer Protocol (TZSP) Parser godoc license Build Status

Package tzsp provides a basic TaZmen Sniffer Protocol parser.

Usage

conn, err := net.ListenUDP("udp", addr)
if err != nil {
    log.Fatal(err)
}

buf := make([]byte, 65535)
for {
    l, _, err := conn.ReadFrom(buf)
    if err != nil {
        panic(err)
    }
    p, err := tzsp.Parse(buf[:l])
    if err != nil {
        panic(err)
    }
    print(p.String())
    // Encapsulated packet data is in p.Data
}

License

Copyright 2016 Olivier Poitrey. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].