guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dhcp] 03/03: dhcp: correct copyright


From: Rohan Prinja
Subject: [dhcp] 03/03: dhcp: correct copyright
Date: Tue, 09 Jun 2015 01:39:16 +0000

wenderen pushed a commit to branch master
in repository dhcp.

commit 85624d570c3a0a51aba7eda64ad3703e54394410
Author: Rohan Prinja <address@hidden>
Date:   Tue Jun 9 07:09:08 2015 +0530

    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(-)

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 (<arp-message>))
+
+(use-modules (oop goops))
+
+(define-class <arp-message> ()
+  (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 <address@hidden>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
 #!/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 <address@hidden>
 ;;;
 ;;; 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 <address@hidden>
 ;;;
 ;;; 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 <address@hidden>
 ;;;
 ;;; 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 <dhcp-message>) (opt <dhcp-option>))
   "Set an <option> in a <dhcp-message>."
   (vector-set! (slot-ref msg 'options)
-              (slot-ref opt 'code)
+              (dhcp-option-code opt)
               opt))
 
 (define-method (option-value (msg <dhcp-message>) code)
   "Retrieve an option's value from a <dhcp-message>."
   (let* ((opts (slot-ref msg 'options))
         (opt (vector-ref opts code))
-        (val (slot-ref opt 'val)))
+        (val (dhcp-option-val opt)))
     val))
 
 ; Get the DHCP message type. See Section 9.6, RFC 2132.
diff --git a/dhcp/options/base.scm b/dhcp/options/base.scm
index b0fa14f..2391fdb 100644
--- a/dhcp/options/base.scm
+++ b/dhcp/options/base.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix DHCP Client.
 ;;;
-;;; Copyright 2015 Free Software Foundation, Inc.
+;;; Copyright � 2015 Rohan Prinja <address@hidden>
 ;;;
 ;;; 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/options/names.scm b/dhcp/options/names.scm
index 3b2e516..750f884 100644
--- a/dhcp/options/names.scm
+++ b/dhcp/options/names.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix DHCP Client.
 ;;;
-;;; Copyright 2015 Free Software Foundation, Inc.
+;;; Copyright � 2015 Rohan Prinja <address@hidden>
 ;;;
 ;;; 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/lib/interfaces.c b/lib/interfaces.c
index 0d09a9b..1e69ebc 100644
--- a/lib/interfaces.c
+++ b/lib/interfaces.c
@@ -1,6 +1,6 @@
 /// GNU Guix DHCP Client.
 ///
-/// Copyright 2015 Free Software Foundation, Inc.
+/// Copyright � 2015 Rohan Prinja <address@hidden>
 ///
 /// 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]