int priv_open(char*);
int priv_ethtool(char*, struct ethtool_cmd*);
int priv_iface_init(struct lldpd_hardware *, int);
-int priv_iface_multicast(char *, u_int8_t *, int);
+int priv_iface_multicast(const char *, u_int8_t *, int);
int priv_snmp_socket(struct sockaddr_un *);
/* privsep_fdpass.c */
static int may_read(int, void *, size_t);
static void must_read(int, void *, size_t);
-static void must_write(int, void *, size_t);
+static void must_write(int, const void *, size_t);
static int remote; /* Other side */
static int monitored = -1; /* Child */
}
int
-priv_iface_multicast(char *name, u_int8_t *mac, int add)
+priv_iface_multicast(const char *name, u_int8_t *mac, int add)
{
int cmd, rc;
cmd = PRIV_IFACE_MULTICAST;
SYSFS_CLASS_DMI "chassis_asset_tag",
NULL
};
- char **f;
+ const char **f;
char *file;
int fd, len, rc;
regex_t preg;
/* Write data with the assertion that it all has to be written, or
* else abort the process. Based on atomicio() from openssh. */
static void
-must_write(int fd, void *buf, size_t n)
+must_write(int fd, const void *buf, size_t n)
{
- char *s = buf;
+ const char *s = buf;
ssize_t res, pos = 0;
while (n > pos) {