# Copyright 2017, Ralph Ronnquist <ralph.ronnquist@gmail.com>
;; This program iplements arp responding for selected IP and
# Copyright 2017, Ralph Ronnquist <ralph.ronnquist@gmail.com>
;; This program iplements arp responding for selected IP and
# handle, and then issues a corresponding response.
(define (icmp-request-handler)
(letn ((h (unpack "bbbb bbbb" (26 buffer)))
# handle, and then issues a corresponding response.
(define (icmp-request-handler)
(letn ((h (unpack "bbbb bbbb" (26 buffer)))
- (n (ntohs((unpack "u" (16 buffer)) 0))))
- (println "ICMP request " (pack-ip (0 4 h)) " --> " (pack-ip (4 4 h)))
- (when (member (4 4 h) MYIPS)
+ (n (ntohs((unpack "u" (16 buffer)) 0)))
+ (MYMAC (MAP (string (4 4 h)))) )
+ (when MYMAC
(stonb 0x0800) ; Type = IPv4
# IPv4 header (20 bytes, with header checksum)
(ipv4-header-checksum
(stonb 0x0800) ; Type = IPv4
# IPv4 header (20 bytes, with header checksum)
(ipv4-header-checksum