Initial echomail import

This commit is contained in:
Deon George
2019-04-27 23:57:39 +10:00
parent 6515c91270
commit 9ba790e72c
14 changed files with 387 additions and 20 deletions

View File

@@ -65,15 +65,28 @@ class FTNMessage extends FTN
$result = unpack($this->unpackheader($struct),$header);
$this->src = sprintf('%s/%s',array_get($result,'onet'),array_get($result,'onode'));
$this->dst = sprintf('%s/%s',array_get($result,'dnet'),array_get($result,'dnode'));
$this->fn = array_get($result,'onet');
$this->ff = array_get($result,'onode');
$this->src = sprintf('%s/%s',
$this->fn,
$this->ff
);
$this->tn = array_get($result,'dnet');
$this->tf = array_get($result,'dnode');
$this->dst = sprintf('%s/%s',
$this->tn,
$this->tf
);
$this->flags = array_get($result,'flags');
$this->cost = array_get($result,'cost');
}
public function __get($k)
{
return $this->{$k};
return isset($this->{$k}) ? $this->{$k} : NULL;
}
public function __set($k,$v)
@@ -130,7 +143,7 @@ class FTNMessage extends FTN
}
foreach ($this->_kludge as $a => $b) {
if ($t = $this->kludge($b, $v)) {
if ($t = $this->kludge($b,$v)) {
$this->kludge->put($a,$t);
break;
}

View File

@@ -127,18 +127,26 @@ class FTNPacket extends FTN
$result1 = unpack($this->unpackheader($pack1),substr($header,0,0x1a));
$result2 = unpack($this->unpackheader($pack2),substr($header,0x22,0x14));
$this->sz = array_get($result2,'ozone');
$this->sn = array_get($result1,'onet');
$this->sf = array_get($result1,'onode');
$this->sp = array_get($result2,'dpoint');
$this->pktsrc = sprintf('%s:%s/%s.%s',
array_get($result2,'ozone'),
array_get($result1,'onet'),
array_get($result1,'onode'),
array_get($result2,'dpoint')
$this->sz,
$this->sn,
$this->sf,
$this->sp
);
$this->dz = array_get($result2,'dzone');
$this->dn = array_get($result1,'dnet');
$this->df = array_get($result1,'dnode');
$this->dp = array_get($result2,'dpoint');
$this->pktdst = sprintf('%s:%s/%s.%s',
array_get($result2,'dzone'),
array_get($result1,'dnet'),
array_get($result1,'dnode'),
array_get($result2,'dpoint')
$this->dz,
$this->dn,
$this->df,
$this->dp
);
$this->date = sprintf ('%d-%d-%d %d:%d:%d',