Searched refs:hostid (Results 1 - 25 of 56) sorted by relevance

123

/freebsd-current/sys/contrib/openzfs/lib/libspl/os/linux/
H A Dgethostid.c36 unsigned long hostid; local
40 * Allow the hostid to be subverted for testing.
46 f = fopen("/proc/sys/kernel/spl/hostid", "re");
50 if (fscanf(f, "%lx", &hostid) != 1)
51 hostid = 0;
55 return (hostid);
61 unsigned long hostid = get_spl_hostid(); local
66 * depending on the libc and /etc/hostid presence,
70 if (hostid == 0) {
71 int fd = open("/etc/hostid", O_RDONL
[all...]
/freebsd-current/lib/libc/compat-43/
H A Dsethostid.c38 sethostid(long hostid) argument
44 sysctl(mib, 2, NULL, NULL, &hostid, sizeof hostid);
/freebsd-current/sys/dev/nvmf/controller/
H A Dnvmft_subr.h30 void nvmf_controller_serial(char *buf, size_t len, u_long hostid);
H A Dnvmft_subr.c166 nvmf_controller_serial(char *buf, size_t len, u_long hostid) argument
168 snprintf(buf, len, "HI:%lu", hostid);
H A Dnvmft_controller.c69 memcpy(ctrlr->hostid, data->hostid, sizeof(ctrlr->hostid));
207 if (memcmp(ctrlr->hostid, data->hostid, sizeof(ctrlr->hostid)) != 0) {
210 "hostid mismatch for I/O queue %u from %.*s\n", qid,
213 offsetof(struct nvmf_fabric_connect_data, hostid));
H A Dnvmft_var.h73 uint8_t hostid[16]; member in struct:nvmft_controller
/freebsd-current/sys/contrib/openzfs/cmd/
H A Dzgenhostid.c44 " -f\t\t force hostid file write\n"
46 " -o <filename>\t write hostid to this file\n\n"
47 "If hostid file is not present, store a hostid in it.\n"
60 const char *path = "/etc/hostid";
132 uint32_t hostid = input_i; local
133 int written = fwrite(&hostid, 1, 4, fp);
/freebsd-current/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/
H A Dmmp.kshlib73 typeset hostid=$1
77 [ $(hostid) = "$hostid" ]
114 log_note "Starting ztest in the background as hostid $HOSTID1"
142 function mmp_pool_set_hostid # pool hostid
145 typeset hostid=$2
148 log_must mmp_set_hostid $hostid
H A Dmmp_hostid.ksh22 # Verify the hostid file can reside on a ZFS dataset.
26 # 2. Create an 'etc' dataset containing a valid hostid file
28 # 4. Verify multihost cannot be enabled until the /etc/hostid is linked
51 log_assert "Verify hostid file can reside on a ZFS dataset"
60 # 2. Create an 'etc' dataset containing a valid hostid file; caching is
61 # disabled on the dataset to force the hostid to be read from disk.
65 log_must mv $HOSTID_FILE $mntpnt_etc/hostid
72 # 4. Verify multihost cannot be enabled until the /etc/hostid is linked
75 log_must ln -s $mntpnt_etc/hostid $HOSTID_FILE
94 log_pass "Verify hostid fil
[all...]
/freebsd-current/sys/contrib/openzfs/contrib/dracut/90zfs/
H A Dmodule-setup.sh.in30 hostid \
69 # Synchronize initramfs and system hostid
70 if ! inst_simple -H @sysconfdir@/hostid; then
71 if HOSTID="$(hostid 2>/dev/null)" && [[ "${HOSTID}" != "00000000" ]]; then
72 zgenhostid -o "${initdir}@sysconfdir@/hostid" "${HOSTID}"
73 mark_hostonly @sysconfdir@/hostid
/freebsd-current/libexec/rc/
H A Dnetstart36 /etc/rc.d/hostid ${_start}
/freebsd-current/usr.sbin/nvmfd/
H A Dio.c34 char hostid[16]; member in struct:io_controller
49 u_long hostid; local
69 /* Generate a serial number from the kern.hostid node. */
70 len = sizeof(hostid);
71 if (sysctlbyname("kern.hostid", &hostid, &len, NULL, 0) == -1)
72 err(1, "sysctl: kern.hostid");
74 nvmf_controller_serial(serial, sizeof(serial), hostid);
501 memcpy(ioc->hostid, data->hostid, sizeo
[all...]
/freebsd-current/libexec/rc/rc.d/
H A Dhostid29 # PROVIDE: hostid
35 name="hostid"
46 # Generate hostid based on hostuuid - take first four bytes from md5(uuid).
50 # Set both kern.hostuuid and kern.hostid.
54 startmsg "Setting hostid: ${id}."
55 ${SYSCTL} kern.hostid=${id} >/dev/null
120 warn "hostid: unable to figure out a UUID from DMI data, generating a new one"
154 # No hostid file, generate UUID.
/freebsd-current/contrib/bsnmp/snmpd/
H A Daction.c93 char *hostid; local
106 if ((hostid = act_getkernint(KERN_HOSTID)) == NULL)
110 len += strlen(hostid) + 1;
115 free(hostid);
118 sprintf(systemg.descr, "%s %s %s %s", uts.nodename, hostid, uts.sysname,
140 free(hostid);
151 char *hostid; local
164 if ((hostid = act_getkernint(KERN_HOSTID)) == NULL)
167 if (strlen(hostid) > SNMP_ENGINE_ID_SIZ - snmpd_engine.engine_len) {
169 hostid, SNMP_ENGINE_ID_SI
[all...]
/freebsd-current/tools/tools/nvmf/nvmfdd/
H A Dnvmfdd.c83 const struct nvmf_qpair_params *params, const uint8_t hostid[16],
92 qp = nvmf_connect(na, params, 0, NVMF_MIN_ADMIN_MAX_SQ_SIZE, hostid,
361 uint8_t hostid[16]; local
440 error = nvmf_hostid_from_hostuuid(hostid);
442 errc(1, error, "Failed to generate hostid");
454 admin = connect_admin_queue(na, &qparams, hostid, cntlid, hostnqn,
477 io = nvmf_connect(na, &qparams, 1, info.mqes + 1, hostid,
82 connect_admin_queue(struct nvmf_association *na, const struct nvmf_qpair_params *params, const uint8_t hostid[16], uint16_t cntlid, const char *hostnqn, const char *subnqn) argument
/freebsd-current/sbin/hastd/
H A Dparse.y732 unsigned long hostid;
767 * Check if it matches hostid.
769 bufsize = sizeof(hostid);
770 if (sysctlbyname("kern.hostid", &hostid, &bufsize, NULL, 0) < 0) {
771 pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostid) failed");
774 (void)snprintf(buf, sizeof(buf), "hostid%lu", hostid);
802 unsigned long hostid;
833 bufsize = sizeof(hostid);
[all...]
/freebsd-current/sys/contrib/openzfs/lib/libzfs/
H A Dlibzfs_status.c227 uint64_t hostid = 0; local
314 (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid);
315 if (hostid != 0 && (unsigned long)hostid != system_hostid &&
/freebsd-current/lib/libnvmf/
H A Dlibnvmf.h217 void nvmf_controller_serial(char *buf, size_t len, u_long hostid);
262 const uint8_t hostid[16], uint16_t cntlid, const char *subnqn,
300 int nvmf_hostid_from_hostuuid(uint8_t hostid[16]);
H A Dnvmf_controller.c141 static const char hostid_zero[sizeof(data->hostid)];
258 /* The hostid must be non-zero. */
259 if (memcmp(data->hostid, hostid_zero, sizeof(hostid_zero)) == 0) {
262 offsetof(struct nvmf_fabric_connect_data, hostid));
/freebsd-current/sbin/nvmecontrol/
H A Dfabrics.c25 static uint8_t hostid[16]; variable
36 error = nvmf_hostid_from_hostuuid(hostid);
38 warnc(error, "Failed to generate hostid");
224 qp = nvmf_connect(na, &qparams, 0, NVME_MIN_ADMIN_ENTRIES, hostid,
287 qp = nvmf_connect(na, params, 0, NVMF_MIN_ADMIN_MAX_SQ_SIZE, hostid,
500 io[i] = nvmf_connect(na, &qparams, i + 1, queue_size, hostid,
H A Dresv.c421 e->ctrlr[i].hostid[0], e->ctrlr[i].hostid[1]);
431 s->ctrlr[i].hostid);
/freebsd-current/sys/contrib/openzfs/module/zfs/
H A Dspa_config.c419 unsigned long hostid = 0; local
470 hostid = spa_get_hostid(spa);
471 if (hostid != 0)
472 fnvlist_add_uint64(config, ZPOOL_CONFIG_HOSTID, hostid);
/freebsd-current/sys/contrib/openzfs/module/os/linux/spl/
H A Dspl-generic.c59 MODULE_PARM_DESC(spl_hostid, "The system hostid.");
671 * Read the unique system identifier from the /etc/hostid file.
673 * The behavior of /usr/bin/hostid on Linux systems with the
676 * 1. Generate the value if the /etc/hostid file does not exist
677 * or if the /etc/hostid file is less than four bytes in size.
679 * 2. If the /etc/hostid file is at least 4 bytes, then return
690 * coreutils: src/hostid.c
694 * The /etc/hostid file on Solaris is a text file that often reads:
700 * hostid of 4f442023 because the default comment constitutes
707 MODULE_PARM_DESC(spl_hostid_path, "The system hostid fil
710 hostid_read(uint32_t *hostid) argument
761 uint32_t hostid; local
[all...]
/freebsd-current/sys/net/
H A Dif_epair.c573 uint64_t hostid; local
585 * Calculate the etheraddr hashing the hostid and the
592 getcredhostid(curthread->td_ucred, (unsigned long *)&hostid);
593 if (hostid == 0)
594 arc4rand(&hostid, sizeof(hostid), 0);
605 key[1] = (uint32_t)(hostid & 0xffffffff);
606 key[2] = (uint32_t)((hostid >> 32) & 0xfffffffff);
/freebsd-current/sys/kern/
H A Dkern_xxx.c96 return (kernel_sysctl(td, name, 2, NULL, NULL, &uap->hostid,
97 sizeof(uap->hostid), NULL, 0));

Completed in 196 milliseconds

123