summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-03-01 22:18:12 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-03-24 13:32:17 +0100
commite6685141aae8fc869d49cde1d459f73b87bbec89 (patch)
tree465539dece789430eaaf76bce18c754c5e18f452 /nhrpd
parent*: Rename thread.[ch] to event.[ch] (diff)
downloadfrr-e6685141aae8fc869d49cde1d459f73b87bbec89.tar.xz
frr-e6685141aae8fc869d49cde1d459f73b87bbec89.zip
*: Rename `struct thread` to `struct event`
Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/netlink_arp.c4
-rw-r--r--nhrpd/nhrp_cache.c6
-rw-r--r--nhrpd/nhrp_event.c10
-rw-r--r--nhrpd/nhrp_multicast.c4
-rw-r--r--nhrpd/nhrp_nhs.c10
-rw-r--r--nhrpd/nhrp_packet.c2
-rw-r--r--nhrpd/nhrp_peer.c6
-rw-r--r--nhrpd/nhrp_shortcut.c6
-rw-r--r--nhrpd/nhrpd.h14
-rw-r--r--nhrpd/vici.c10
10 files changed, 36 insertions, 36 deletions
diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c
index 552730d12..485aae742 100644
--- a/nhrpd/netlink_arp.c
+++ b/nhrpd/netlink_arp.c
@@ -23,7 +23,7 @@
int netlink_nflog_group;
static int netlink_log_fd = -1;
-static struct thread *netlink_log_thread;
+static struct event *netlink_log_thread;
void netlink_update_binding(struct interface *ifp, union sockunion *proto,
union sockunion *nbma)
@@ -96,7 +96,7 @@ static void netlink_log_indication(struct nlmsghdr *msg, struct zbuf *zb)
nhrp_peer_send_indication(ifp, htons(pkthdr->hw_protocol), &pktpl);
}
-static void netlink_log_recv(struct thread *t)
+static void netlink_log_recv(struct event *t)
{
uint8_t buf[ZNL_BUFFER_SIZE];
int fd = THREAD_FD(t);
diff --git a/nhrpd/nhrp_cache.c b/nhrpd/nhrp_cache.c
index ac1c8f9eb..cb50dd52d 100644
--- a/nhrpd/nhrp_cache.c
+++ b/nhrpd/nhrp_cache.c
@@ -195,7 +195,7 @@ struct nhrp_cache *nhrp_cache_get(struct interface *ifp,
create ? nhrp_cache_alloc : NULL);
}
-static void nhrp_cache_do_free(struct thread *t)
+static void nhrp_cache_do_free(struct event *t)
{
struct nhrp_cache *c = THREAD_ARG(t);
@@ -203,7 +203,7 @@ static void nhrp_cache_do_free(struct thread *t)
nhrp_cache_free(c);
}
-static void nhrp_cache_do_timeout(struct thread *t)
+static void nhrp_cache_do_timeout(struct event *t)
{
struct nhrp_cache *c = THREAD_ARG(t);
@@ -395,7 +395,7 @@ static void nhrp_cache_authorize_binding(struct nhrp_reqid *r, void *arg)
nhrp_cache_update_timers(c);
}
-static void nhrp_cache_do_auth_timeout(struct thread *t)
+static void nhrp_cache_do_auth_timeout(struct event *t)
{
struct nhrp_cache *c = THREAD_ARG(t);
c->t_auth = NULL;
diff --git a/nhrpd/nhrp_event.c b/nhrpd/nhrp_event.c
index 25f5a701b..ad98da9ba 100644
--- a/nhrpd/nhrp_event.c
+++ b/nhrpd/nhrp_event.c
@@ -20,14 +20,14 @@ const char *nhrp_event_socket_path;
struct nhrp_reqid_pool nhrp_event_reqid;
struct event_manager {
- struct thread *t_reconnect, *t_read, *t_write;
+ struct event *t_reconnect, *t_read, *t_write;
struct zbuf ibuf;
struct zbuf_queue obuf;
int fd;
uint8_t ibuf_data[4 * 1024];
};
-static void evmgr_reconnect(struct thread *t);
+static void evmgr_reconnect(struct event *t);
static void evmgr_connection_error(struct event_manager *evmgr)
{
@@ -74,7 +74,7 @@ static void evmgr_recv_message(struct event_manager *evmgr, struct zbuf *zb)
}
}
-static void evmgr_read(struct thread *t)
+static void evmgr_read(struct event *t)
{
struct event_manager *evmgr = THREAD_ARG(t);
struct zbuf *ibuf = &evmgr->ibuf;
@@ -92,7 +92,7 @@ static void evmgr_read(struct thread *t)
thread_add_read(master, evmgr_read, evmgr, evmgr->fd, &evmgr->t_read);
}
-static void evmgr_write(struct thread *t)
+static void evmgr_write(struct event *t)
{
struct event_manager *evmgr = THREAD_ARG(t);
int r;
@@ -179,7 +179,7 @@ static void evmgr_submit(struct event_manager *evmgr, struct zbuf *obuf)
&evmgr->t_write);
}
-static void evmgr_reconnect(struct thread *t)
+static void evmgr_reconnect(struct event *t)
{
struct event_manager *evmgr = THREAD_ARG(t);
int fd;
diff --git a/nhrpd/nhrp_multicast.c b/nhrpd/nhrp_multicast.c
index e37dfb5d8..db85d550c 100644
--- a/nhrpd/nhrp_multicast.c
+++ b/nhrpd/nhrp_multicast.c
@@ -28,7 +28,7 @@ DEFINE_MTYPE_STATIC(NHRPD, NHRP_MULTICAST, "NHRP Multicast");
int netlink_mcast_nflog_group;
static int netlink_mcast_log_fd = -1;
-static struct thread *netlink_mcast_log_thread;
+static struct event *netlink_mcast_log_thread;
struct mcast_ctx {
struct interface *ifp;
@@ -138,7 +138,7 @@ static void netlink_mcast_log_handler(struct nlmsghdr *msg, struct zbuf *zb)
}
}
-static void netlink_mcast_log_recv(struct thread *t)
+static void netlink_mcast_log_recv(struct event *t)
{
uint8_t buf[65535]; /* Max OSPF Packet size */
int fd = THREAD_FD(t);
diff --git a/nhrpd/nhrp_nhs.c b/nhrpd/nhrp_nhs.c
index 358d1b94c..c6a6b8e75 100644
--- a/nhrpd/nhrp_nhs.c
+++ b/nhrpd/nhrp_nhs.c
@@ -13,8 +13,8 @@
DEFINE_MTYPE_STATIC(NHRPD, NHRP_NHS, "NHRP next hop server");
DEFINE_MTYPE_STATIC(NHRPD, NHRP_REGISTRATION, "NHRP registration entries");
-static void nhrp_nhs_resolve(struct thread *t);
-static void nhrp_reg_send_req(struct thread *t);
+static void nhrp_nhs_resolve(struct event *t);
+static void nhrp_reg_send_req(struct event *t);
static void nhrp_reg_reply(struct nhrp_reqid *reqid, void *arg)
{
@@ -103,7 +103,7 @@ static void nhrp_reg_reply(struct nhrp_reqid *reqid, void *arg)
&cie_nbma_nhs);
}
-static void nhrp_reg_timeout(struct thread *t)
+static void nhrp_reg_timeout(struct event *t)
{
struct nhrp_registration *r = THREAD_ARG(t);
struct nhrp_cache *c;
@@ -155,7 +155,7 @@ static void nhrp_reg_peer_notify(struct notifier_block *n, unsigned long cmd)
}
}
-static void nhrp_reg_send_req(struct thread *t)
+static void nhrp_reg_send_req(struct event *t)
{
struct nhrp_registration *r = THREAD_ARG(t);
struct nhrp_nhs *nhs = r->nhs;
@@ -309,7 +309,7 @@ static void nhrp_nhs_resolve_cb(struct resolver_query *q, const char *errstr,
nhrp_reg_delete(reg);
}
-static void nhrp_nhs_resolve(struct thread *t)
+static void nhrp_nhs_resolve(struct event *t)
{
struct nhrp_nhs *nhs = THREAD_ARG(t);
diff --git a/nhrpd/nhrp_packet.c b/nhrpd/nhrp_packet.c
index d201eb6cc..650b3ab87 100644
--- a/nhrpd/nhrp_packet.c
+++ b/nhrpd/nhrp_packet.c
@@ -286,7 +286,7 @@ err:
return -1;
}
-static void nhrp_packet_recvraw(struct thread *t)
+static void nhrp_packet_recvraw(struct event *t)
{
int fd = THREAD_FD(t), ifindex;
struct zbuf *zb;
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c
index 25ce59a40..95694a41f 100644
--- a/nhrpd/nhrp_peer.c
+++ b/nhrpd/nhrp_peer.c
@@ -51,7 +51,7 @@ static void nhrp_peer_check_delete(struct nhrp_peer *p)
XFREE(MTYPE_NHRP_PEER, p);
}
-static void nhrp_peer_notify_up(struct thread *t)
+static void nhrp_peer_notify_up(struct event *t)
{
struct nhrp_peer *p = THREAD_ARG(t);
struct nhrp_vc *vc = p->vc;
@@ -248,7 +248,7 @@ void nhrp_peer_unref(struct nhrp_peer *p)
}
}
-static void nhrp_peer_request_timeout(struct thread *t)
+static void nhrp_peer_request_timeout(struct event *t)
{
struct nhrp_peer *p = THREAD_ARG(t);
struct nhrp_vc *vc = p->vc;
@@ -271,7 +271,7 @@ static void nhrp_peer_request_timeout(struct thread *t)
}
}
-static void nhrp_peer_defer_vici_request(struct thread *t)
+static void nhrp_peer_defer_vici_request(struct event *t)
{
struct nhrp_peer *p = THREAD_ARG(t);
struct nhrp_vc *vc = p->vc;
diff --git a/nhrpd/nhrp_shortcut.c b/nhrpd/nhrp_shortcut.c
index e5516ba72..b1e2b7cea 100644
--- a/nhrpd/nhrp_shortcut.c
+++ b/nhrpd/nhrp_shortcut.c
@@ -18,7 +18,7 @@ DEFINE_MTYPE_STATIC(NHRPD, NHRP_SHORTCUT, "NHRP shortcut");
static struct route_table *shortcut_rib[AFI_MAX];
-static void nhrp_shortcut_do_purge(struct thread *t);
+static void nhrp_shortcut_do_purge(struct event *t);
static void nhrp_shortcut_delete(struct nhrp_shortcut *s);
static void nhrp_shortcut_send_resolution_req(struct nhrp_shortcut *s);
@@ -31,7 +31,7 @@ static void nhrp_shortcut_check_use(struct nhrp_shortcut *s)
}
}
-static void nhrp_shortcut_do_expire(struct thread *t)
+static void nhrp_shortcut_do_expire(struct event *t)
{
struct nhrp_shortcut *s = THREAD_ARG(t);
@@ -154,7 +154,7 @@ static void nhrp_shortcut_delete(struct nhrp_shortcut *s)
}
}
-static void nhrp_shortcut_do_purge(struct thread *t)
+static void nhrp_shortcut_do_purge(struct event *t)
{
struct nhrp_shortcut *s = THREAD_ARG(t);
s->t_timer = NULL;
diff --git a/nhrpd/nhrpd.h b/nhrpd/nhrpd.h
index c01296bee..942822271 100644
--- a/nhrpd/nhrpd.h
+++ b/nhrpd/nhrpd.h
@@ -166,9 +166,9 @@ struct nhrp_peer {
struct notifier_list notifier_list;
struct interface *ifp;
struct nhrp_vc *vc;
- struct thread *t_fallback;
+ struct event *t_fallback;
struct notifier_block vc_notifier, ifp_notifier;
- struct thread *t_timer;
+ struct event *t_timer;
};
struct nhrp_packet_parser {
@@ -232,8 +232,8 @@ struct nhrp_cache {
struct notifier_block newpeer_notifier;
struct notifier_list notifier_list;
struct nhrp_reqid eventid;
- struct thread *t_timeout;
- struct thread *t_auth;
+ struct event *t_timeout;
+ struct event *t_auth;
struct {
enum nhrp_cache_type type;
@@ -251,7 +251,7 @@ struct nhrp_shortcut {
union sockunion addr;
struct nhrp_reqid reqid;
- struct thread *t_timer;
+ struct event *t_timer;
enum nhrp_cache_type type;
unsigned int holding_time;
@@ -275,7 +275,7 @@ struct nhrp_nhs {
union sockunion proto_addr;
const char *nbma_fqdn; /* IP-address or FQDN */
- struct thread *t_resolve;
+ struct event *t_resolve;
struct resolver_query dns_resolve;
struct nhrp_reglist_head reglist_head;
};
@@ -293,7 +293,7 @@ DECLARE_DLIST(nhrp_mcastlist, struct nhrp_multicast, mcastlist_entry);
struct nhrp_registration {
struct nhrp_reglist_item reglist_entry;
- struct thread *t_register;
+ struct event *t_register;
struct nhrp_nhs *nhs;
struct nhrp_reqid reqid;
unsigned int timeout;
diff --git a/nhrpd/vici.c b/nhrpd/vici.c
index 880e0c253..02e36d2e6 100644
--- a/nhrpd/vici.c
+++ b/nhrpd/vici.c
@@ -44,7 +44,7 @@ static int blob2buf(const struct blob *b, char *buf, size_t n)
}
struct vici_conn {
- struct thread *t_reconnect, *t_read, *t_write;
+ struct event *t_reconnect, *t_read, *t_write;
struct zbuf ibuf;
struct zbuf_queue obuf;
int fd;
@@ -56,7 +56,7 @@ struct vici_message_ctx {
int nsections;
};
-static void vici_reconnect(struct thread *t);
+static void vici_reconnect(struct event *t);
static void vici_submit_request(struct vici_conn *vici, const char *name, ...);
static void vici_zbuf_puts(struct zbuf *obuf, const char *str)
@@ -357,7 +357,7 @@ static void vici_recv_message(struct vici_conn *vici, struct zbuf *msg)
}
}
-static void vici_read(struct thread *t)
+static void vici_read(struct event *t)
{
struct vici_conn *vici = THREAD_ARG(t);
struct zbuf *ibuf = &vici->ibuf;
@@ -387,7 +387,7 @@ static void vici_read(struct thread *t)
thread_add_read(master, vici_read, vici, vici->fd, &vici->t_read);
}
-static void vici_write(struct thread *t)
+static void vici_write(struct event *t)
{
struct vici_conn *vici = THREAD_ARG(t);
int r;
@@ -500,7 +500,7 @@ static char *vici_get_charon_filepath(void)
return buff;
}
-static void vici_reconnect(struct thread *t)
+static void vici_reconnect(struct event *t)
{
struct vici_conn *vici = THREAD_ARG(t);
int fd;