squish

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FidoDateDayMask   = 0x001F // 00000000 00011111
	FidoDateMonthMask = 0x01E0 // 00000001 11100000
	FidoDateYearMask  = 0xFE00 // 11111110 00000000
)
View Source
const (
	FidoDateSecondsMask = 0x001F // 00000000 00011111
	FidoDateMinuteMask  = 0x07E0 // 00000111 11100000
	FidoDateHourMask    = 0xF800 // 11111000 00000000
)
View Source
const MAX_REPLY = 9
View Source
const SQFRAMEID = 0xAFAE4453

Variables

This section is empty.

Functions

This section is empty.

Types

type FidoDate

type FidoDate struct {
	Date uint16 // DOS bitmapped date value
	Time uint16 // DOS bitmapped time  value
}

func (FidoDate) GetDate

func (self FidoDate) GetDate() string

*

  • Get date *
  • The first five bits represent the day of the month.
  • (A value of 1 represents the first of the month.) *
  • The next four bits indicate the month of the year.
  • (1=January; 12=December.) *
  • The remaining seven bits indicate the year (relative to 1980).

func (FidoDate) GetDateTime

func (self FidoDate) GetDateTime() string

func (FidoDate) GetTime

func (self FidoDate) GetTime() string

*

  • Get time *
  • The first five bits indicate the seconds
  • value, divided by two. This implies
  • that all message dates and times get
  • rounded to a multiple of two seconds.
  • Example:
  • 0 seconds = 0
  • 16 seconds = 8
  • 58 seconds = 29 *
  • The next six bits represent the minutes value. *
  • The remaining five bits represent the
  • hour value, using a 24-hour clock.

type FidoMessage

type FidoMessage struct {
}

type FidoMessageBase

type FidoMessageBase struct {
	Msgs []FidoMessage
	// contains filtered or unexported fields
}

func (*FidoMessageBase) GetMessageCount

func (self *FidoMessageBase) GetMessageCount() int

func (*FidoMessageBase) ReadBase

func (self *FidoMessageBase) ReadBase(dirname string) ([]*Header, error)

type FrameType

type FrameType uint16
const (
	FrameTypeNormal FrameType = 0
	FrameTypeFree   FrameType = 1
	FrameTypeLZSS   FrameType = 2
	FrameTypeUpdate FrameType = 3
)
type Header struct {
	ID          string // Message ID (i.e. index value provided by engine to repetable search in base)
	UMSGID      uint32 // Message ID in UMSGID value
	From        string // From
	FromAddr    string
	To          string // To
	ToAddr      string
	Subject     string // Subject
	DateWritten string // Message date written
	DateArrived string // Message date arrival
	Hash        string // MD5 digest of message body
	Body        []byte // Message body
}

func (Header) GetContent

func (self Header) GetContent() string

type Message

type Message struct {
	Control []byte
	Body    []byte
}

type NetAddress

type NetAddress struct {
	Zone  uint16 // FidoNet zone number
	Net   uint16 // FidoNet net number
	Node  uint16 // FidoNet node number.
	Point uint16 // FidoNet point number
}

func (NetAddress) GetAddr

func (self NetAddress) GetAddr() string

type SquishMessage

type SquishMessage struct {
}

type SquishMessageBase

type SquishMessageBase struct {
	Msgs []SquishMessage
	// contains filtered or unexported fields
}

func (*SquishMessageBase) GetMessageCount

func (self *SquishMessageBase) GetMessageCount() int

func (*SquishMessageBase) ReadBase

func (self *SquishMessageBase) ReadBase(filename string) ([]*Header, error)

func (*SquishMessageBase) ReadMessage

func (self *SquishMessageBase) ReadMessage(filename string, UMSGID uint32) (*Header, error)

type SquishMessageBaseFrameHeader

type SquishMessageBaseFrameHeader struct {
	ID            uint32    // Must always equal SQFRAMEID
	NextFrame     uint32    // Offset of next frame
	PrevFrame     uint32    // Offset of previous frame
	FrameLength   uint32    // Length of this frame
	MsgLength     uint32    // Length of data in frame (hdr+ctl+txt)
	ControlLength uint32    // Length of control info
	FrameType     FrameType // Frm type (normal or free)
	Reserved      uint16    // Reserved
}

type SquishMessageBaseHeader

type SquishMessageBaseHeader struct {
	Size           uint16    /* sizeof(SqshBaseT)                 */
	Reserved1      uint16    /* Reserved                          */
	MessageNumber  uint32    /* Number of messages                */
	HighestMsg     uint32    /* Highest msg in area               */
	Protmsgs       uint32    /* Skip killing first x msgs in area */
	Highwatermark  uint32    /* Relno (not Tagno) of HWM          */
	Nextmsgno      uint32    /* Next message number to use        */
	Name           [80]byte  /* Base name of SquishFile           */
	BeginFrame     uint32    /* Offset of the first frame         */
	LastFrame      uint32    // Offset to last frame in file
	FirstFreeFrame uint32    // Offset of first FREE frame in file
	LastFreeFrame  uint32    // Offset of last free frame in file
	EndFrame       uint32    // Pointer to end of file
	MaxMsgs        uint32    // Max # of msgs to keep in area
	DaysToKeep     uint16    // Max age of msgs in area (for packing util)
	FrameSize      uint16    // sizeof(SqshFrmT)
	Reserved2      [124]byte // Reserved by Squish for future use
}

type SquishMessageBaseMessageHeader

type SquishMessageBaseMessageHeader struct {
	Attr        uint32     // Message attributes
	From        [36]byte   // From
	To          [36]byte   // To
	Subject     [72]byte   // Subject
	Orig        NetAddress //
	Dest        NetAddress //
	DateWritten FidoDate   // When user wrote the msg (UTC)
	DateArrived FidoDate   // When msg arrived on-line (UTC)
	UtcOffset   int16      // Offset from UTC of message writer, in minutes.
	ReplyTo     UMSGID
	Replies     [MAX_REPLY]UMSGID
	UMSGID      UMSGID
	DateFTSC    [20]byte
}

type UMSGID

type UMSGID uint32

func (UMSGID) GetMessageID

func (self UMSGID) GetMessageID() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL