Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file

Dependencies:   net 1-wire lpc1768 crypto clock web fram log

/media/uploads/andrewboyson/heating.sch

/media/uploads/andrewboyson/heating.brd

/media/uploads/andrewboyson/eagle.epf

Committer:
andrewboyson
Date:
Tue Jan 08 21:06:27 2019 +0000
Revision:
21:0c9673027ff9
Parent:
13:2ca12dd42e91
Child:
28:bb55def47737
updated clock library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 0:3c04f4b47041 1 #include <stdbool.h>
andrewboyson 8:8b5e0bb28da0 2 #include <stdlib.h>
andrewboyson 0:3c04f4b47041 3
andrewboyson 21:0c9673027ff9 4 #include "clkgov.h"
andrewboyson 8:8b5e0bb28da0 5 #include "fram.h"
andrewboyson 8:8b5e0bb28da0 6 #include "log.h"
andrewboyson 8:8b5e0bb28da0 7 #include "net.h"
andrewboyson 8:8b5e0bb28da0 8 #include "link.h"
andrewboyson 8:8b5e0bb28da0 9 #include "dnsname.h"
andrewboyson 8:8b5e0bb28da0 10 #include "dnsquery.h"
andrewboyson 8:8b5e0bb28da0 11 #include "dnsreply.h"
andrewboyson 8:8b5e0bb28da0 12 #include "dnsserver.h"
andrewboyson 8:8b5e0bb28da0 13 #include "ntp.h"
andrewboyson 8:8b5e0bb28da0 14 #include "dhcp.h"
andrewboyson 8:8b5e0bb28da0 15 #include "ns.h"
andrewboyson 8:8b5e0bb28da0 16 #include "nr4.h"
andrewboyson 8:8b5e0bb28da0 17 #include "nr6.h"
andrewboyson 8:8b5e0bb28da0 18 #include "ntp-client.h"
andrewboyson 8:8b5e0bb28da0 19 #include "1-wire.h"
andrewboyson 8:8b5e0bb28da0 20 #include "echo4.h"
andrewboyson 8:8b5e0bb28da0 21 #include "echo6.h"
andrewboyson 8:8b5e0bb28da0 22 #include "dest6.h"
andrewboyson 8:8b5e0bb28da0 23 #include "ra.h"
andrewboyson 8:8b5e0bb28da0 24 #include "rs.h"
andrewboyson 8:8b5e0bb28da0 25 #include "ar4.h"
andrewboyson 8:8b5e0bb28da0 26 #include "ar6.h"
andrewboyson 8:8b5e0bb28da0 27 #include "arp.h"
andrewboyson 8:8b5e0bb28da0 28 #include "ip4.h"
andrewboyson 8:8b5e0bb28da0 29 #include "ip6.h"
andrewboyson 8:8b5e0bb28da0 30 #include "udp.h"
andrewboyson 8:8b5e0bb28da0 31 #include "tcp.h"
andrewboyson 8:8b5e0bb28da0 32 #include "http.h"
andrewboyson 8:8b5e0bb28da0 33 #include "tftp.h"
andrewboyson 8:8b5e0bb28da0 34 #include "dns.h"
andrewboyson 0:3c04f4b47041 35
andrewboyson 21:0c9673027ff9 36 static int iClkGovSlewDivisor ;
andrewboyson 21:0c9673027ff9 37 static int iClkGovSlewMaxMs ;
andrewboyson 21:0c9673027ff9 38 static int iClkGovPpbDivisor ;
andrewboyson 21:0c9673027ff9 39 static int iClkGovPpbChangeMax ;
andrewboyson 21:0c9673027ff9 40 static int iClkGovSyncedLimitNs ;
andrewboyson 21:0c9673027ff9 41 static int iClkGovSyncedLimitPpb ;
andrewboyson 21:0c9673027ff9 42 static int iClkGovSyncedHysterisNs ;
andrewboyson 21:0c9673027ff9 43 static int iClkGovSyncedHysterisPpb;
andrewboyson 21:0c9673027ff9 44 static int iClkGovMaxOffsetSecs ;
andrewboyson 21:0c9673027ff9 45 static int iClkGov;
andrewboyson 8:8b5e0bb28da0 46
andrewboyson 8:8b5e0bb28da0 47 static int iOneWire;
andrewboyson 8:8b5e0bb28da0 48
andrewboyson 8:8b5e0bb28da0 49 static int iDnsSendRequestsViaIp4 ;
andrewboyson 8:8b5e0bb28da0 50 static int iNtpSendRequestsViaIp4 ;
andrewboyson 8:8b5e0bb28da0 51 static int iTftpSendRequestsViaIp4;
andrewboyson 0:3c04f4b47041 52
andrewboyson 8:8b5e0bb28da0 53 static int iNetHost;
andrewboyson 8:8b5e0bb28da0 54 static int iLogUart;
andrewboyson 8:8b5e0bb28da0 55 static int iNetStack;
andrewboyson 8:8b5e0bb28da0 56 static int iNetNewLine;
andrewboyson 8:8b5e0bb28da0 57 static int iNetVerbose;
andrewboyson 8:8b5e0bb28da0 58 static int iLink;
andrewboyson 8:8b5e0bb28da0 59 static int iDnsName;
andrewboyson 8:8b5e0bb28da0 60 static int iDnsQuery;
andrewboyson 8:8b5e0bb28da0 61 static int iDnsReply;
andrewboyson 8:8b5e0bb28da0 62 static int iDnsServer;
andrewboyson 8:8b5e0bb28da0 63 static int iNtp;
andrewboyson 8:8b5e0bb28da0 64 static int iDhcp;
andrewboyson 8:8b5e0bb28da0 65 static int iNsRecvSol;
andrewboyson 8:8b5e0bb28da0 66 static int iNsRecvAdv;
andrewboyson 8:8b5e0bb28da0 67 static int iNsSendSol;
andrewboyson 8:8b5e0bb28da0 68 static int iNr4;
andrewboyson 8:8b5e0bb28da0 69 static int iNr6;
andrewboyson 8:8b5e0bb28da0 70 static int iNtpClient;
andrewboyson 8:8b5e0bb28da0 71 static int iEcho4;
andrewboyson 8:8b5e0bb28da0 72 static int iEcho6;
andrewboyson 8:8b5e0bb28da0 73 static int iDest6;
andrewboyson 8:8b5e0bb28da0 74 static int iRa;
andrewboyson 8:8b5e0bb28da0 75 static int iRs;
andrewboyson 8:8b5e0bb28da0 76 static int iAr4;
andrewboyson 8:8b5e0bb28da0 77 static int iAr6;
andrewboyson 8:8b5e0bb28da0 78 static int iArp;
andrewboyson 8:8b5e0bb28da0 79 static int iIp4;
andrewboyson 8:8b5e0bb28da0 80 static int iIp6;
andrewboyson 8:8b5e0bb28da0 81 static int iUdp;
andrewboyson 8:8b5e0bb28da0 82 static int iTcp;
andrewboyson 8:8b5e0bb28da0 83 static int iHttp;
andrewboyson 8:8b5e0bb28da0 84 static int iTftp;
andrewboyson 8:8b5e0bb28da0 85
andrewboyson 8:8b5e0bb28da0 86 //Clock settings
andrewboyson 21:0c9673027ff9 87 void SetClockSlewDivisor (int value) { ClkGovSlewDivisor = value; FramWrite(iClkGovSlewDivisor, 4, &ClkGovSlewDivisor ); }
andrewboyson 21:0c9673027ff9 88 void SetClockSlewMaxMs (int value) { ClkGovSlewMaxMs = value; FramWrite(iClkGovSlewMaxMs, 4, &ClkGovSlewMaxMs ); }
andrewboyson 21:0c9673027ff9 89 void SetClockPpbDivisor (int value) { ClkGovPpbDivisor = value; FramWrite(iClkGovPpbDivisor, 4, &ClkGovPpbDivisor ); }
andrewboyson 21:0c9673027ff9 90 void SetClockPpbChangeMax (int value) { ClkGovPpbChangeMax = value; FramWrite(iClkGovPpbChangeMax, 4, &ClkGovPpbChangeMax ); }
andrewboyson 21:0c9673027ff9 91 void SetClockSyncedLimitNs (int value) { ClkGovSyncedLimitNs = value; FramWrite(iClkGovSyncedLimitNs, 4, &ClkGovSyncedLimitNs ); }
andrewboyson 21:0c9673027ff9 92 void SetClockSyncedLimitPpb (int value) { ClkGovSyncedLimitPpb = value; FramWrite(iClkGovSyncedLimitPpb, 4, &ClkGovSyncedLimitPpb ); }
andrewboyson 21:0c9673027ff9 93 void SetClockSyncedHysterisNs (int value) { ClkGovSyncedHysterisNs = value; FramWrite(iClkGovSyncedHysterisNs, 4, &ClkGovSyncedHysterisNs ); }
andrewboyson 21:0c9673027ff9 94 void SetClockSyncedHysterisPpb(int value) { ClkGovSyncedHysterisPpb = value; FramWrite(iClkGovSyncedHysterisPpb, 4, &ClkGovSyncedHysterisPpb); }
andrewboyson 21:0c9673027ff9 95 void SetClockMaxOffsetSecs (int value) { ClkGovMaxOffsetSecs = value; FramWrite(iClkGovMaxOffsetSecs, 4, &ClkGovMaxOffsetSecs ); }
andrewboyson 21:0c9673027ff9 96 void ChgTraceSync () { ClkGovTrace = !ClkGovTrace ; FramWrite(iClkGov, 1, &ClkGovTrace ); }
andrewboyson 8:8b5e0bb28da0 97
andrewboyson 8:8b5e0bb28da0 98 //Heating settings
andrewboyson 13:2ca12dd42e91 99 void ChgTraceOneWire () { OneWireTrace = !OneWireTrace ; FramWrite(iOneWire, 1, &OneWireTrace ); }
andrewboyson 8:8b5e0bb28da0 100
andrewboyson 8:8b5e0bb28da0 101 //Net settings
andrewboyson 8:8b5e0bb28da0 102 void ChgDnsSendRequestsViaIp4 () { DnsSendRequestsViaIp4 = !DnsSendRequestsViaIp4; FramWrite( iDnsSendRequestsViaIp4, 1, &DnsSendRequestsViaIp4); }
andrewboyson 8:8b5e0bb28da0 103 void ChgNtpSendRequestsViaIp4 () { NtpSendRequestsViaIp4 = !NtpSendRequestsViaIp4; FramWrite( iNtpSendRequestsViaIp4, 1, &NtpSendRequestsViaIp4); }
andrewboyson 8:8b5e0bb28da0 104 void ChgTftpSendRequestsViaIp4 () { TftpSendRequestsViaIp4 = !TftpSendRequestsViaIp4; FramWrite(iTftpSendRequestsViaIp4, 1, &TftpSendRequestsViaIp4); }
andrewboyson 8:8b5e0bb28da0 105
andrewboyson 8:8b5e0bb28da0 106 void SetTraceNetHost (char* text)
andrewboyson 8:8b5e0bb28da0 107 {
andrewboyson 8:8b5e0bb28da0 108 int value = strtol(text, NULL, 16);
andrewboyson 8:8b5e0bb28da0 109 NetTraceHost[1] = value & 0xFF;
andrewboyson 8:8b5e0bb28da0 110 NetTraceHost[0] = (value >> 8) & 0xFF;
andrewboyson 8:8b5e0bb28da0 111 FramWrite(iNetHost, 2, NetTraceHost);
andrewboyson 8:8b5e0bb28da0 112 }
andrewboyson 8:8b5e0bb28da0 113 void ChgLogUart () { LogUart = !LogUart; FramWrite(iLogUart, 1, &LogUart ); }
andrewboyson 8:8b5e0bb28da0 114 void ChgTraceNetStack () { NetTraceStack = !NetTraceStack; FramWrite(iNetStack, 1, &NetTraceStack ); }
andrewboyson 8:8b5e0bb28da0 115 void ChgTraceNetNewLine() { NetTraceNewLine = !NetTraceNewLine; FramWrite(iNetNewLine, 1, &NetTraceNewLine); }
andrewboyson 8:8b5e0bb28da0 116 void ChgTraceNetVerbose() { NetTraceVerbose = !NetTraceVerbose; FramWrite(iNetVerbose, 1, &NetTraceVerbose); }
andrewboyson 8:8b5e0bb28da0 117 void ChgTraceLink () { LinkTrace = !LinkTrace; FramWrite(iLink, 1, &LinkTrace ); }
andrewboyson 8:8b5e0bb28da0 118 void ChgTraceDnsName () { DnsNameTrace = !DnsNameTrace; FramWrite(iDnsName, 1, &DnsNameTrace ); }
andrewboyson 8:8b5e0bb28da0 119 void ChgTraceDnsQuery () { DnsQueryTrace = !DnsQueryTrace; FramWrite(iDnsQuery, 1, &DnsQueryTrace ); }
andrewboyson 8:8b5e0bb28da0 120 void ChgTraceDnsReply () { DnsReplyTrace = !DnsReplyTrace; FramWrite(iDnsReply, 1, &DnsReplyTrace ); }
andrewboyson 8:8b5e0bb28da0 121 void ChgTraceDnsServer () { DnsServerTrace = !DnsServerTrace; FramWrite(iDnsServer, 1, &DnsServerTrace ); }
andrewboyson 8:8b5e0bb28da0 122 void ChgTraceNtp () { NtpTrace = !NtpTrace; FramWrite(iNtp, 1, &NtpTrace ); }
andrewboyson 8:8b5e0bb28da0 123 void ChgTraceDhcp () { DhcpTrace = !DhcpTrace; FramWrite(iDhcp, 1, &DhcpTrace ); }
andrewboyson 8:8b5e0bb28da0 124 void ChgTraceNsRecvSol () { NsTraceRecvSol = !NsTraceRecvSol; FramWrite(iNsRecvSol, 1, &NsTraceRecvSol); }
andrewboyson 8:8b5e0bb28da0 125 void ChgTraceNsRecvAdv () { NsTraceRecvAdv = !NsTraceRecvAdv; FramWrite(iNsRecvAdv, 1, &NsTraceRecvAdv); }
andrewboyson 8:8b5e0bb28da0 126 void ChgTraceNsSendSol () { NsTraceSendSol = !NsTraceSendSol; FramWrite(iNsSendSol, 1, &NsTraceSendSol); }
andrewboyson 8:8b5e0bb28da0 127 void ChgTraceNr4 () { Nr4Trace = !Nr4Trace ; FramWrite(iNr4, 1, &Nr4Trace ); }
andrewboyson 8:8b5e0bb28da0 128 void ChgTraceNr6 () { Nr6Trace = !Nr6Trace ; FramWrite(iNr6, 1, &Nr6Trace ); }
andrewboyson 8:8b5e0bb28da0 129 void ChgTraceNtpClient () { NtpClientTrace = !NtpClientTrace ; FramWrite(iNtpClient, 1, &NtpClientTrace ); }
andrewboyson 8:8b5e0bb28da0 130 void ChgTraceEcho4 () { Echo4Trace = !Echo4Trace ; FramWrite(iEcho4, 1, &Echo4Trace ); }
andrewboyson 8:8b5e0bb28da0 131 void ChgTraceEcho6 () { Echo6Trace = !Echo6Trace ; FramWrite(iEcho6, 1, &Echo6Trace ); }
andrewboyson 8:8b5e0bb28da0 132 void ChgTraceDest6 () { Dest6Trace = !Dest6Trace ; FramWrite(iDest6, 1, &Dest6Trace ); }
andrewboyson 8:8b5e0bb28da0 133 void ChgTraceRa () { RaTrace = !RaTrace ; FramWrite(iRa, 1, &RaTrace ); }
andrewboyson 8:8b5e0bb28da0 134 void ChgTraceRs () { RsTrace = !RsTrace ; FramWrite(iRs, 1, &RsTrace ); }
andrewboyson 8:8b5e0bb28da0 135 void ChgTraceAr4 () { Ar4Trace = !Ar4Trace ; FramWrite(iAr4, 1, &Ar4Trace ); }
andrewboyson 8:8b5e0bb28da0 136 void ChgTraceAr6 () { Ar6Trace = !Ar6Trace ; FramWrite(iAr6, 1, &Ar6Trace ); }
andrewboyson 8:8b5e0bb28da0 137 void ChgTraceArp () { ArpTrace = !ArpTrace ; FramWrite(iArp, 1, &ArpTrace ); }
andrewboyson 8:8b5e0bb28da0 138 void ChgTraceIp4 () { Ip4Trace = !Ip4Trace ; FramWrite(iIp4, 1, &Ip4Trace ); }
andrewboyson 8:8b5e0bb28da0 139 void ChgTraceIp6 () { Ip6Trace = !Ip6Trace ; FramWrite(iIp6, 1, &Ip6Trace ); }
andrewboyson 8:8b5e0bb28da0 140 void ChgTraceUdp () { UdpTrace = !UdpTrace ; FramWrite(iUdp, 1, &UdpTrace ); }
andrewboyson 8:8b5e0bb28da0 141 void ChgTraceTcp () { TcpTrace = !TcpTrace ; FramWrite(iTcp, 1, &TcpTrace ); }
andrewboyson 8:8b5e0bb28da0 142 void ChgTraceHttp () { HttpTrace = !HttpTrace ; FramWrite(iHttp, 1, &HttpTrace ); }
andrewboyson 8:8b5e0bb28da0 143 void ChgTraceTftp () { TftpTrace = !TftpTrace ; FramWrite(iTftp, 1, &TftpTrace ); }
andrewboyson 0:3c04f4b47041 144
andrewboyson 0:3c04f4b47041 145 int SettingsInit()
andrewboyson 0:3c04f4b47041 146 {
andrewboyson 0:3c04f4b47041 147 int address;
andrewboyson 0:3c04f4b47041 148 int32_t def4;
andrewboyson 0:3c04f4b47041 149 char b;
andrewboyson 0:3c04f4b47041 150
andrewboyson 21:0c9673027ff9 151 def4 = 10; address = FramLoad( 4, &ClkGovSlewDivisor, &def4); if (address < 0) return -1; iClkGovSlewDivisor = address;
andrewboyson 21:0c9673027ff9 152 def4 = 20; address = FramLoad( 4, &ClkGovSlewMaxMs, &def4); if (address < 0) return -1; iClkGovSlewMaxMs = address;
andrewboyson 21:0c9673027ff9 153 def4 = 1000; address = FramLoad( 4, &ClkGovPpbDivisor, &def4); if (address < 0) return -1; iClkGovPpbDivisor = address;
andrewboyson 21:0c9673027ff9 154 def4 = 10000000; address = FramLoad( 4, &ClkGovPpbChangeMax, &def4); if (address < 0) return -1; iClkGovPpbChangeMax = address;
andrewboyson 21:0c9673027ff9 155 def4 = 100000; address = FramLoad( 4, &ClkGovSyncedLimitNs, &def4); if (address < 0) return -1; iClkGovSyncedLimitNs = address;
andrewboyson 21:0c9673027ff9 156 def4 = 100000; address = FramLoad( 4, &ClkGovSyncedLimitPpb, &def4); if (address < 0) return -1; iClkGovSyncedLimitPpb = address;
andrewboyson 21:0c9673027ff9 157 def4 = 10000; address = FramLoad( 4, &ClkGovSyncedHysterisNs, &def4); if (address < 0) return -1; iClkGovSyncedHysterisNs = address;
andrewboyson 21:0c9673027ff9 158 def4 = 1000; address = FramLoad( 4, &ClkGovSyncedHysterisPpb, &def4); if (address < 0) return -1; iClkGovSyncedHysterisPpb = address;
andrewboyson 21:0c9673027ff9 159 def4 = 3; address = FramLoad( 4, &ClkGovMaxOffsetSecs, &def4); if (address < 0) return -1; iClkGovMaxOffsetSecs = address;
andrewboyson 21:0c9673027ff9 160 address = FramLoad( 1, &b, NULL); ClkGovTrace = b; if (address < 0) return -1; iClkGov = address;
andrewboyson 13:2ca12dd42e91 161 address = FramLoad( 1, &b, NULL); OneWireTrace = b; if (address < 0) return -1; iOneWire = address;
andrewboyson 13:2ca12dd42e91 162 address = FramLoad( 1, &b, NULL); DnsSendRequestsViaIp4 = b; if (address < 0) return -1; iDnsSendRequestsViaIp4 = address;
andrewboyson 13:2ca12dd42e91 163 address = FramLoad( 1, &b, NULL); NtpSendRequestsViaIp4 = b; if (address < 0) return -1; iNtpSendRequestsViaIp4 = address;
andrewboyson 13:2ca12dd42e91 164 address = FramLoad( 1, &b, NULL); TftpSendRequestsViaIp4 = b; if (address < 0) return -1; iTftpSendRequestsViaIp4 = address;
andrewboyson 13:2ca12dd42e91 165 address = FramLoad( 1, &b, NULL); LogUart = b; if (address < 0) return -1; iLogUart = address;
andrewboyson 13:2ca12dd42e91 166 address = FramLoad( 2, NetTraceHost, NULL) ; if (address < 0) return -1; iNetHost = address;
andrewboyson 13:2ca12dd42e91 167 address = FramLoad( 1, &b, NULL); NetTraceStack = b; if (address < 0) return -1; iNetStack = address;
andrewboyson 13:2ca12dd42e91 168 address = FramLoad( 1, &b, NULL); NetTraceNewLine = b; if (address < 0) return -1; iNetNewLine = address;
andrewboyson 13:2ca12dd42e91 169 address = FramLoad( 1, &b, NULL); NetTraceVerbose = b; if (address < 0) return -1; iNetVerbose = address;
andrewboyson 13:2ca12dd42e91 170 address = FramLoad( 1, &b, NULL); LinkTrace = b; if (address < 0) return -1; iLink = address;
andrewboyson 13:2ca12dd42e91 171 address = FramLoad( 1, &b, NULL); DnsNameTrace = b; if (address < 0) return -1; iDnsName = address;
andrewboyson 13:2ca12dd42e91 172 address = FramLoad( 1, &b, NULL); DnsQueryTrace = b; if (address < 0) return -1; iDnsQuery = address;
andrewboyson 13:2ca12dd42e91 173 address = FramLoad( 1, &b, NULL); DnsReplyTrace = b; if (address < 0) return -1; iDnsReply = address;
andrewboyson 13:2ca12dd42e91 174 address = FramLoad( 1, &b, NULL); DnsServerTrace = b; if (address < 0) return -1; iDnsServer = address;
andrewboyson 13:2ca12dd42e91 175 address = FramLoad( 1, &b, NULL); NtpTrace = b; if (address < 0) return -1; iNtp = address;
andrewboyson 13:2ca12dd42e91 176 address = FramLoad( 1, &b, NULL); DhcpTrace = b; if (address < 0) return -1; iDhcp = address;
andrewboyson 13:2ca12dd42e91 177 address = FramLoad( 1, &b, NULL); NsTraceRecvSol = b; if (address < 0) return -1; iNsRecvSol = address;
andrewboyson 13:2ca12dd42e91 178 address = FramLoad( 1, &b, NULL); NsTraceRecvAdv = b; if (address < 0) return -1; iNsRecvAdv = address;
andrewboyson 13:2ca12dd42e91 179 address = FramLoad( 1, &b, NULL); NsTraceSendSol = b; if (address < 0) return -1; iNsSendSol = address;
andrewboyson 13:2ca12dd42e91 180 address = FramLoad( 1, &b, NULL); Nr4Trace = b; if (address < 0) return -1; iNr4 = address;
andrewboyson 13:2ca12dd42e91 181 address = FramLoad( 1, &b, NULL); Nr6Trace = b; if (address < 0) return -1; iNr6 = address;
andrewboyson 13:2ca12dd42e91 182 address = FramLoad( 1, &b, NULL); NtpClientTrace = b; if (address < 0) return -1; iNtpClient = address;
andrewboyson 13:2ca12dd42e91 183 address = FramLoad( 1, &b, NULL); Echo4Trace = b; if (address < 0) return -1; iEcho4 = address;
andrewboyson 13:2ca12dd42e91 184 address = FramLoad( 1, &b, NULL); Echo6Trace = b; if (address < 0) return -1; iEcho6 = address;
andrewboyson 13:2ca12dd42e91 185 address = FramLoad( 1, &b, NULL); Dest6Trace = b; if (address < 0) return -1; iDest6 = address;
andrewboyson 13:2ca12dd42e91 186 address = FramLoad( 1, &b, NULL); RaTrace = b; if (address < 0) return -1; iRa = address;
andrewboyson 13:2ca12dd42e91 187 address = FramLoad( 1, &b, NULL); RsTrace = b; if (address < 0) return -1; iRs = address;
andrewboyson 13:2ca12dd42e91 188 address = FramLoad( 1, &b, NULL); Ar4Trace = b; if (address < 0) return -1; iAr4 = address;
andrewboyson 13:2ca12dd42e91 189 address = FramLoad( 1, &b, NULL); Ar6Trace = b; if (address < 0) return -1; iAr6 = address;
andrewboyson 13:2ca12dd42e91 190 address = FramLoad( 1, &b, NULL); ArpTrace = b; if (address < 0) return -1; iArp = address;
andrewboyson 13:2ca12dd42e91 191 address = FramLoad( 1, &b, NULL); Ip4Trace = b; if (address < 0) return -1; iIp4 = address;
andrewboyson 13:2ca12dd42e91 192 address = FramLoad( 1, &b, NULL); Ip6Trace = b; if (address < 0) return -1; iIp6 = address;
andrewboyson 13:2ca12dd42e91 193 address = FramLoad( 1, &b, NULL); UdpTrace = b; if (address < 0) return -1; iUdp = address;
andrewboyson 13:2ca12dd42e91 194 address = FramLoad( 1, &b, NULL); TcpTrace = b; if (address < 0) return -1; iTcp = address;
andrewboyson 13:2ca12dd42e91 195 address = FramLoad( 1, &b, NULL); HttpTrace = b; if (address < 0) return -1; iHttp = address;
andrewboyson 13:2ca12dd42e91 196 address = FramLoad( 1, &b, NULL); TftpTrace = b; if (address < 0) return -1; iTftp = address;
andrewboyson 8:8b5e0bb28da0 197
andrewboyson 0:3c04f4b47041 198 return 0;
andrewboyson 0:3c04f4b47041 199 }