MCPcopy Create free account
hub / github.com/F-Stack/f-stack / callback_register

Function callback_register

tools/ifconfig/ifconfig.c:957–969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

955static struct callback *callbacks = NULL;
956
957void
958callback_register(callback_func *func, void *arg)
959{
960 struct callback *cb;
961
962 cb = malloc(sizeof(struct callback));
963 if (cb == NULL)
964 errx(1, "unable to allocate memory for callback");
965 cb->cb_func = func;
966 cb->cb_arg = arg;
967 cb->cb_next = callbacks;
968 callbacks = cb;
969}
970
971/* specially-handled commands */
972static void setifaddr(const char *, int, int, const struct afswtch *);

Callers 11

ifieee80211.cFile · 0.85
set80211locationFunction · 0.85
set80211ecmFunction · 0.85
setmediaFunction · 0.85
domediaoptFunction · 0.85
setmediainstFunction · 0.85
setmediamodeFunction · 0.85
ifclone.cFile · 0.85
vlan_ctorFunction · 0.85
vxlan_ctorFunction · 0.85
setcarp_vhidFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected