MCPcopy Index your code
hub / github.com/F-Stack/f-stack / do_cmd

Function do_cmd

tools/ifconfig/ifbridge.c:88–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static int
89do_cmd(int sock, u_long op, void *arg, size_t argsize, int set)
90{
91 struct ifdrv ifd;
92
93 memset(&ifd, 0, sizeof(ifd));
94
95 strlcpy(ifd.ifd_name, ifr.ifr_name, sizeof(ifd.ifd_name));
96 ifd.ifd_cmd = op;
97 ifd.ifd_len = argsize;
98 ifd.ifd_data = arg;
99
100#ifndef FSTACK
101 return (ioctl(sock, set ? SIOCSDRVSPEC : SIOCGDRVSPEC, &ifd));
102#else
103 size_t offset = (char *)&(ifd.ifd_data) - (char *)&(ifd);
104 return (ioctl_va(sock, set ? SIOCSDRVSPEC : SIOCGDRVSPEC, &ifd,
105 3, offset, arg, argsize));
106#endif
107}
108
109static void
110do_bridgeflag(int sock, const char *ifs, int flag, int set)

Callers 15

do_bridgeflagFunction · 0.70
bridge_interfacesFunction · 0.70
bridge_addressesFunction · 0.70
bridge_statusFunction · 0.70
setbridge_addFunction · 0.70
setbridge_deleteFunction · 0.70
setbridge_spanFunction · 0.70
unsetbridge_spanFunction · 0.70
setbridge_flushFunction · 0.70
setbridge_flushallFunction · 0.70
setbridge_staticFunction · 0.70
setbridge_deladdrFunction · 0.70

Calls 4

memsetFunction · 0.85
ioctl_vaFunction · 0.85
strlcpyFunction · 0.50
ioctlFunction · 0.50

Tested by

no test coverage detected