mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
The opticsmon tool started out as a tool for monitoring the health of optical modules in directly attached PCI NICs. In the future however it will also monitor the health of other PCI devices. In particular in a first step it will monitor the health of directly attached NVMe devices. To reflect this broadening of its scope rename opticsmon to zpcimon. Add zpcimon.service and install it both under the new name and symlinked as opticsmon.service for backwards compatibility. Since users are expected to mostly just enable the service this keeps old instructions just working. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
28 lines
724 B
C
28 lines
724 B
C
/*
|
|
* Copyright IBM Corp. 2024
|
|
*
|
|
* s390-tools is free software; you can redistribute it and/or modify
|
|
* it under the terms of the MIT license. See LICENSE for details.
|
|
*/
|
|
#pragma once
|
|
#include <stdint.h>
|
|
|
|
#include <linux/if.h>
|
|
|
|
#include "lib/pci_list.h"
|
|
|
|
typedef void (*link_mon_nl_cb)(struct zpci_netdev *, void *arg);
|
|
|
|
struct link_mon_nl_ctx {
|
|
/* private fields */
|
|
struct nl_sock *sk;
|
|
struct nl_cache *cache;
|
|
link_mon_nl_cb cb;
|
|
void *arg;
|
|
};
|
|
|
|
int link_mon_nl_waitfd_create(struct link_mon_nl_ctx *ctx, link_mon_nl_cb cb, void *arg);
|
|
void link_mon_nl_waitfd_read(struct link_mon_nl_ctx *ctx);
|
|
void link_mon_nl_waitfd_destroy(struct link_mon_nl_ctx *ctx);
|
|
int link_mon_nl_waitfd_getfd(struct link_mon_nl_ctx *ctx);
|