diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-02-22 23:44:00 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-02-22 23:44:00 +0000 |
commit | a5fd288ababbacbf7c8cb1693f2b78161480c2da (patch) | |
tree | ee2ce97fe0d129ba4fa4cd562ac3400281390bd0 /sbin | |
parent | 37a9dbeed643802899683075dd514d97872eda8f (diff) |
remove unused decode_hw_header() function
ok krw@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhcpd.h | 4 | ||||
-rw-r--r-- | sbin/dhclient/packet.c | 17 |
2 files changed, 2 insertions, 19 deletions
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index e874d04c33c..57c0af2bcf5 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.293 2021/02/22 02:19:03 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.294 2021/02/22 23:43:59 jsg Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -231,8 +231,6 @@ char *rfc1035_as_string(unsigned char *, size_t); /* packet.c */ void assemble_eh_header(struct ether_addr, struct ether_header *); -ssize_t decode_hw_header(unsigned char *, uint32_t, - struct ether_addr *); ssize_t decode_udp_ip_header(unsigned char *, uint32_t, struct sockaddr_in *); uint32_t checksum(unsigned char *, uint32_t, uint32_t); diff --git a/sbin/dhclient/packet.c b/sbin/dhclient/packet.c index 903b719c772..8b4afbc7149 100644 --- a/sbin/dhclient/packet.c +++ b/sbin/dhclient/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.44 2018/02/28 22:16:56 krw Exp $ */ +/* $OpenBSD: packet.c,v 1.45 2021/02/22 23:43:59 jsg Exp $ */ /* Packet assembly code, originally contributed by Archie Cobbs. */ @@ -104,21 +104,6 @@ assemble_eh_header(struct ether_addr shost, struct ether_header *eh) } ssize_t -decode_hw_header(unsigned char *buf, uint32_t buflen, struct ether_addr *from) -{ - struct ether_header eh; - - if (buflen < sizeof(eh)) - return -1; - - memcpy(&eh, buf, sizeof(eh)); - - memcpy(from->ether_addr_octet, eh.ether_shost, ETHER_ADDR_LEN); - - return sizeof(eh); -} - -ssize_t decode_udp_ip_header(unsigned char *buf, uint32_t buflen, struct sockaddr_in *from) { |