}
+extern char *myname;
/*
Execute mtr-packet, allowing the MTR_PACKET evironment to override
the PATH when locating the executable.
void execute_packet_child(
void)
{
+ char buf[256];
/*
Allow the MTR_PACKET environment variable to override
the path to the mtr-packet executable. This is necessary
*/
execlp(mtr_packet_path, "mtr-packet", (char *) NULL);
+ /*
+ Then try to find it where WE were executed from.
+ */
+ strncpy (buf, myname, 240);
+ strcat (buf, "-packet");
+ mtr_packet_path = buf;
+ execl(mtr_packet_path, "mtr-packet", (char *) NULL);
+
/*
If mtr-packet is not found, try to use mtr-packet from current directory
*/
#endif
+char *myname;
+
const struct fields data_fields[MAXFLD] = {
/* key, Remark, Header, Format, Width, CallBackFunc */
{' ', "<sp>: Space between fields", " ", " ", 1, &net_drop},
names_t *names_head = NULL;
names_t *names_walk;
+ myname = argv[0];
struct mtr_ctl ctl;
memset(&ctl, 0, sizeof(ctl));
/* initialize non-null values */