From 85624d570c3a0a51aba7eda64ad3703e54394410 Mon Sep 17 00:00:00 2001 From: Rohan Prinja Date: Tue, 9 Jun 2015 07:09:08 +0530 Subject: [PATCH] dhcp: correct copyright --- arp/messages.scm | 20 ++++++++++++++++++++ dhcp/client.scm | 17 +++++++++++++++++ dhcp/dhcp.scm | 2 +- dhcp/interfaces.scm | 2 +- dhcp/messages.scm | 12 ++++++------ dhcp/options/base.scm | 2 +- dhcp/options/names.scm | 2 +- lib/interfaces.c | 2 +- 8 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 arp/messages.scm diff --git a/arp/messages.scm b/arp/messages.scm new file mode 100644 index 0000000..948388a --- /dev/null +++ b/arp/messages.scm @@ -0,0 +1,20 @@ +#!/usr/local/bin/guile +coding: utf-8 +!# + +; Tell Guile to also search for modules in the +; current directory. +(add-to-load-path (dirname (current-filename))) + +; Module for constructing and parsing ARP messages +(define-module (arp-messages) + #:export ()) + +(use-modules (oop goops)) + +(define-class () + (hw-type #:init-value 1) ; ethernet + (protocol-type #:init-value #x800) + (hlen #:init-value 48) + (plen #:init-value 32) ; ipv4 + 'TODO) diff --git a/dhcp/client.scm b/dhcp/client.scm index e9cf826..99e6530 100644 --- a/dhcp/client.scm +++ b/dhcp/client.scm @@ -1,3 +1,20 @@ +;;; GNU Guix DHCP Client. +;;; +;;; Copyright © 2015 Rohan Prinja +;;; +;;; This program is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see . + #!/usr/local/bin/guile \ -e main -s coding: utf-8 diff --git a/dhcp/dhcp.scm b/dhcp/dhcp.scm index 30a6eab..46242d9 100644 --- a/dhcp/dhcp.scm +++ b/dhcp/dhcp.scm @@ -1,6 +1,6 @@ ;;; GNU Guix DHCP Client. ;;; -;;; Copyright 2015 Free Software Foundation, Inc. +;;; Copyright © 2015 Rohan Prinja ;;; ;;; This program is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by diff --git a/dhcp/interfaces.scm b/dhcp/interfaces.scm index 272bdb2..fa595f5 100644 --- a/dhcp/interfaces.scm +++ b/dhcp/interfaces.scm @@ -1,6 +1,6 @@ ;;; GNU Guix DHCP Client. ;;; -;;; Copyright 2015 Free Software Foundation, Inc. +;;; Copyright © 2015 Rohan Prinja ;;; ;;; This program is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by diff --git a/dhcp/messages.scm b/dhcp/messages.scm index 5000edd..4c7c422 100644 --- a/dhcp/messages.scm +++ b/dhcp/messages.scm @@ -1,6 +1,6 @@ -3;;; GNU Guix DHCP Client. +;;; GNU Guix DHCP Client. ;;; -;;; Copyright 2015 Free Software Foundation, Inc. +;;; Copyright © 2015 Rohan Prinja ;;; ;;; This program is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by @@ -100,8 +100,8 @@ simply ignored whilst serializing." (if (eq? #nil opt) (loop (1+ i)) (let ((code i) - (len (slot-ref opt 'len)) - (val (slot-ref opt 'val))) + (len (dhcp-option-len opt)) + (val (dhcp-option-val opt))) (begin (if (zero? len) (bytevector-u8-set! dst idx code) @@ -208,14 +208,14 @@ from BV starting at index START" (define-method (set-option! (msg ) (opt )) "Set an