aboutsummaryrefslogtreecommitdiff
path: root/j1demo/firmware/ntp.fs
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-10-30 20:04:56 +0100
committerDimitri Sokolyuk <demon@dim13.org>2019-10-30 20:04:56 +0100
commita76977af62010a392c16010c367185e61e856ffe (patch)
tree56cf4177d5bc0e3ead781d1c60818c13b1df0f3c /j1demo/firmware/ntp.fs
parentc0165d167d7cb40d80028bcf7a4a6b160b5a7e83 (diff)
mv to docs
Diffstat (limited to 'j1demo/firmware/ntp.fs')
-rw-r--r--j1demo/firmware/ntp.fs36
1 files changed, 0 insertions, 36 deletions
diff --git a/j1demo/firmware/ntp.fs b/j1demo/firmware/ntp.fs
deleted file mode 100644
index 881296a..0000000
--- a/j1demo/firmware/ntp.fs
+++ /dev/null
@@ -1,36 +0,0 @@
-( NTP JCB 09:54 11/17/10)
-
-: ntp-server
- \ h# 02830a00.
- \ ip# 91.189.94.4 \ time.ubuntu
- ip# 17.151.16.20 \ time.apple.com
-;
-
-: ntp-request
- d# 123 d# 9999
- ntp-server
- net-my-ip
- 2over arp-lookup
- ( dst-port src-port dst-ip src-ip *ethaddr )
- udp-header
- h# 2304 mac-pkt-, h# 04ec mac-pkt-,
- d# 6 mac-pkt-,0
-
- d# 4 mac-pkt-,0 \ originate
- d# 4 mac-pkt-,0 \ reference
- d# 4 mac-pkt-,0 \ receive
- \ d# 4 mac-pkt-,0 \ transmit
- time@ mac-pkt-d, d# 2 mac-pkt-,0
- udp-wrapup mac-send
-;
-
-: ntp-handler
- IP_PROTO_UDP ip-isproto
- ETH.IP.UDP.SOURCEPORT packet@ d# 123 = and
- ETH.IP.UDP.DESTPORT packet@ d# 9999 = and
- if
- ETH.IP.UDP.NTP.TRANSMIT packetd@ setdate
- time@ ETH.IP.UDP.NTP.ORIGINATE packetd@ d- setdelay
- then
-;
-