Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- SPDX-License-Identifier: BSD-3-Clause -->
<!-- Copyright (c) 2017-2025 Roy Marples <roy@marples.name> -->

# Building dhcpcd

This attempts to document various ways of building dhcpcd for your
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2006-2025 Roy Marples <roy@marples.name>

SUBDIRS= src hooks

PACKAGE= dhcpcd
Expand Down
3 changes: 3 additions & 0 deletions Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2009-2025 Roy Marples <roy@marples.name>

# System definitions

PICFLAG?= -fPIC
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- SPDX-License-Identifier: BSD-3-Clause -->
<!-- Copyright (c) 2017-2023 Roy Marples <roy@marples.name> -->

# dhcpcd

dhcpcd is a
Expand Down
1 change: 1 addition & 0 deletions compat/_strtoi.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: _strtoi.h,v 1.1 2015/01/22 02:15:59 christos Exp $ */

/*-
* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
Expand Down
1 change: 1 addition & 0 deletions compat/arc4random.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $OpenBSD: arc4random.c,v 1.58 2022/07/31 13:41:45 tb Exp $ */

/*
* SPDX-License-Identifier: ISC
* Copyright (c) 1996, David Mazieres <dm@uun.org>
* Copyright (c) 2008, Damien Miller <djm@openbsd.org>
* Copyright (c) 2013, Markus Friedl <markus@openbsd.org>
Expand Down
1 change: 1 addition & 0 deletions compat/arc4random.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Arc4 random number generator for OpenBSD.
* SPDX-License-Identifier: ISC
* Copyright 1996 David Mazieres <dm@lcs.mit.edu>.
*
* Modification and redistribution in source and binary forms is
Expand Down
1 change: 1 addition & 0 deletions compat/arc4random_uniform.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $OpenBSD: arc4random_uniform.c,v 1.3 2019/01/20 02:59:07 bcook Exp $ */

/*
* SPDX-License-Identifier: ISC
* Copyright (c) 2008, Damien Miller <djm@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
Expand Down
1 change: 1 addition & 0 deletions compat/arc4random_uniform.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: ISC
* Copyright (c) 2008, Damien Miller <djm@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
Expand Down
1 change: 1 addition & 0 deletions compat/bitops.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: bitops.h,v 1.11 2012/12/07 02:27:58 christos Exp $ */

/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
* All rights reserved.
*
Expand Down
2 changes: 2 additions & 0 deletions compat/chacha_private.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: CC0-1.0 */

/*
chacha-merged.c version 20080118
D. J. Bernstein
Expand Down
2 changes: 2 additions & 0 deletions compat/consttime_memequal.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: CC0-1.0 */

/*
* Written by Matthias Drochner <drochner@NetBSD.org>.
* Public domain.
Expand Down
1 change: 1 addition & 0 deletions compat/crypt/hmac.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: hmac.c,v 1.5 2017/10/05 09:59:04 roy Exp $ */

/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2016 The NetBSD Foundation, Inc.
* All rights reserved.
*
Expand Down
1 change: 1 addition & 0 deletions compat/crypt/hmac.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: hmac.c,v 1.5 2017/10/05 09:59:04 roy Exp $ */

/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2016 The NetBSD Foundation, Inc.
* All rights reserved.
*
Expand Down
2 changes: 2 additions & 0 deletions compat/crypt/md5.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: CC0-1.0 */

/*
* This code implements the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was
Expand Down
2 changes: 2 additions & 0 deletions compat/crypt/md5.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: CC0-1.0 */

/*
* This code implements the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was
Expand Down
1 change: 1 addition & 0 deletions compat/crypt/sha256.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright 2005 Colin Percival
* All rights reserved.
*
Expand Down
1 change: 1 addition & 0 deletions compat/crypt/sha256.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright 2005 Colin Percival
* All rights reserved.
*
Expand Down
1 change: 1 addition & 0 deletions compat/dprintf.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* dhcpcd - DHCP client daemon
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2006-2017 Roy Marples <roy@marples.name>
* All rights reserved

Expand Down
1 change: 1 addition & 0 deletions compat/dprintf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* dhcpcd - DHCP client daemon
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2006-2017 Roy Marples <roy@marples.name>
* All rights reserved

Expand Down
1 change: 1 addition & 0 deletions compat/endian.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* dhcpcd - DHCP client daemon
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2006-2014 Roy Marples <roy@marples.name>
* All rights reserved

Expand Down
1 change: 1 addition & 0 deletions compat/pidfile.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: pidfile.c,v 1.16 2021/08/01 15:29:29 andvar Exp $ */

/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 1999, 2016 The NetBSD Foundation, Inc.
* All rights reserved.
*
Expand Down
1 change: 1 addition & 0 deletions compat/pidfile.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 1999, 2016 The NetBSD Foundation, Inc.
* All rights reserved.
*
Expand Down
5 changes: 5 additions & 0 deletions compat/queue.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2014-2025 Roy Marples <roy@marples.name>
*/

/* This stub exists to avoid including queue.h in the vendor folder
* for source imports */
#ifdef BSD
Expand Down
1 change: 1 addition & 0 deletions compat/reallocarray.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: reallocarr.c,v 1.4 2015/08/20 20:08:04 joerg Exp $ */

/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2015 Joerg Sonnenberger <joerg@NetBSD.org>.
* All rights reserved.
*
Expand Down
1 change: 1 addition & 0 deletions compat/reallocarray.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: reallocarr.c,v 1.4 2015/08/20 20:08:04 joerg Exp $ */

/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2015 Joerg Sonnenberger <joerg@NetBSD.org>.
* All rights reserved.
*
Expand Down
1 change: 1 addition & 0 deletions compat/setproctitle.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: MIT
* Copyright © 2010 William Ahern
* Copyright © 2012-2013 Guillem Jover <guillem@hadrons.org>
*
Expand Down
1 change: 1 addition & 0 deletions compat/setproctitle.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: MIT
* Copyright © 2010 William Ahern
* Copyright © 2012-2013 Guillem Jover <guillem@hadrons.org>
*
Expand Down
1 change: 1 addition & 0 deletions compat/strlcpy.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $OpenBSD: strlcpy.c,v 1.16 2019/01/25 00:19:25 millert Exp $ */

/*
* SPDX-License-Identifier: ISC
* Copyright (c) 1998, 2015 Todd C. Miller <millert@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
Expand Down
1 change: 1 addition & 0 deletions compat/strlcpy.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $OpenBSD: strlcpy.c,v 1.15 2016/10/16 17:37:39 dtucker Exp $ */

/*
* SPDX-License-Identifier: ISC
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
Expand Down
1 change: 1 addition & 0 deletions compat/strtoi.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: strtoi.c,v 1.3 2019/11/28 12:33:23 roy Exp $ */

/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2005 The DragonFly Project. All rights reserved.
* Copyright (c) 2003 Citrus Project,
* All rights reserved.
Expand Down
1 change: 1 addition & 0 deletions compat/strtoi.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*-
* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
Expand Down
1 change: 1 addition & 0 deletions compat/strtou.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* $NetBSD: strtou.c,v 1.3 2019/11/28 12:33:23 roy Exp $ */

/*-
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2005 The DragonFly Project. All rights reserved.
* Copyright (c) 2003 Citrus Project,
* All rights reserved.
Expand Down
3 changes: 3 additions & 0 deletions config-null.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2014 Roy Marples <roy@marples.name>

# This space left intentionally blank

DHCPCD_SRCS+= dhcpcd-embedded.c
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2009-2025 Roy Marples <roy@marples.name>

# Try and be like autotools configure, but without autotools

echo "configure args: $*"
Expand Down
3 changes: 3 additions & 0 deletions hooks/01-test
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2020 Roy Marples <roy@marples.name>

# Echo the interface flags, reason and message options

if [ "$reason" = "TEST" ]; then
Expand Down
3 changes: 3 additions & 0 deletions hooks/10-wpa_supplicant
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2024 Roy Marples <roy@marples.name>

# Start, reconfigure and stop wpa_supplicant per wireless interface.
#
# This is only needed when using wpa_supplicant-2.5 or older, OR
Expand Down
3 changes: 3 additions & 0 deletions hooks/15-timezone
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2020 Roy Marples <roy@marples.name>

# Configure timezone

: ${localtime:=/etc/localtime}
Expand Down
3 changes: 3 additions & 0 deletions hooks/20-resolv.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2025 Roy Marples <roy@marples.name>

# Generate /etc/resolv.conf
# Support resolvconf(8) if available
# We can merge other dhcpcd resolv.conf files into one like resolvconf,
Expand Down
3 changes: 3 additions & 0 deletions hooks/29-lookup-hostname
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2022 Roy Marples <roy@marples.name>

# Lookup the hostname in DNS if not set

lookup_hostname()
Expand Down
3 changes: 3 additions & 0 deletions hooks/30-hostname.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2020-2024 Roy Marples <roy@marples.name>

# Set the hostname from DHCP data if required

# A hostname can either be a short hostname or a FQDN.
Expand Down
3 changes: 3 additions & 0 deletions hooks/50-dhcpcd-compat
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017 Roy Marples <roy@marples.name>

# Compat enter hook shim for older dhcpcd versions

IPADDR=$new_ip_address
Expand Down
3 changes: 3 additions & 0 deletions hooks/50-ntp.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2026 Roy Marples <roy@marples.name>

# Sample dhcpcd hook script for NTP
# It will configure either one of NTP, OpenNTP or Chrony (in that order)
# and will default to NTP if no default config is found.
Expand Down
3 changes: 3 additions & 0 deletions hooks/50-timesyncd.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2022-2026 Roy Marples <roy@marples.name>

if [ ! -d /run/systemd/system ]; then
return
fi
Expand Down
3 changes: 3 additions & 0 deletions hooks/50-yp.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2020 Roy Marples <roy@marples.name>

# Sample dhcpcd hook for ypbind
# This script is only suitable for the Linux version.

Expand Down
3 changes: 3 additions & 0 deletions hooks/50-ypbind.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2021 Roy Marples <roy@marples.name>

# Sample dhcpcd hook for ypbind
# This script is only suitable for the BSD versions.

Expand Down
3 changes: 3 additions & 0 deletions hooks/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2023 Roy Marples <roy@marples.name>

TOP= ../
include ${TOP}/iconfig.mk

Expand Down
1 change: 1 addition & 0 deletions hooks/dhcpcd-run-hooks.8.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.\" SPDX-License-Identifier: BSD-2-Clause
.\" Copyright (c) 2006-2025 Roy Marples
.\" All rights reserved
.\"
Expand Down
3 changes: 3 additions & 0 deletions hooks/dhcpcd-run-hooks.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2022 Roy Marples <roy@marples.name>

# dhcpcd client configuration script

# Handy variables and functions for our hooks to use
Expand Down
3 changes: 3 additions & 0 deletions iconfig.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2014-2019 Roy Marples <roy@marples.name>

# Nasty hack so that make clean works without configure being run
TOP?= .
_CONFIG_MK!= test -e ${TOP}/config.mk && \
Expand Down
3 changes: 3 additions & 0 deletions src/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017 Roy Marples <roy@marples.name>

# GNU Make does not automagically include .depend
# Luckily it does read GNUmakefile over Makefile so we can work around it

Expand Down
3 changes: 3 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2025 Roy Marples <roy@marples.name>

# dhcpcd Makefile

PROG= dhcpcd
Expand Down
3 changes: 3 additions & 0 deletions src/dev/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2017-2025 Roy Marples <roy@marples.name>

TOP= ../../
include ${TOP}/Makefile.inc
include ${TOP}/config.mk
Expand Down
1 change: 1 addition & 0 deletions src/dhcpcd-definitions-small.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2006-2025 Roy Marples <roy@marples.name>
# All rights reserved

Expand Down
1 change: 1 addition & 0 deletions src/dhcpcd-definitions.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2006-2025 Roy Marples <roy@marples.name>
# All rights reserved

Expand Down
1 change: 1 addition & 0 deletions src/dhcpcd-embedded.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/*
* dhcpcd - DHCP client daemon
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2006-2025 Roy Marples <roy@marples.name>
* All rights reserved

Expand Down
1 change: 1 addition & 0 deletions src/dhcpcd-embedded.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* dhcpcd - DHCP client daemon
* SPDX-License-Identifier: BSD-2-Clause
* Copyright (c) 2006-2025 Roy Marples <roy@marples.name>
* All rights reserved

Expand Down
Loading
Loading