int id;
} *downstreams, *upstreams;
+#ifndef UNIT_TEST
static struct stream_list *parse_downstream(char *);
static struct stream_list *parse_upstream(char *);
static void setup_streams(void);
+#endif /* UNIT_TEST */
#endif
+#ifndef UNIT_TEST
static void do_relay4(struct interface_info *, struct dhcp_packet *,
unsigned int, unsigned int, struct iaddr,
struct hardware *);
-static int add_relay_agent_options(struct interface_info *,
+
+#endif /* UNIT_TEST */
+
+extern int add_relay_agent_options(struct interface_info *,
struct dhcp_packet *, unsigned,
struct in_addr);
-static int find_interface_by_agent_option(struct dhcp_packet *,
+extern int find_interface_by_agent_option(struct dhcp_packet *,
struct interface_info **, u_int8_t *, int);
-static int strip_relay_agent_options(struct interface_info *,
+extern int strip_relay_agent_options(struct interface_info *,
struct interface_info **,
struct dhcp_packet *, unsigned);
+
+#ifndef UNIT_TEST
static void request_v4_interface(const char* name, int flags);
static const char copyright[] =
}
+#endif /* UNIT TEST */
+
/* Strip any Relay Agent Information options from the DHCP packet
option buffer. If there is a circuit ID suboption, look up the
outgoing interface based upon it. */
-static int
+int
strip_relay_agent_options(struct interface_info *in,
struct interface_info **out,
struct dhcp_packet *packet,
we find a circuit ID that matches an existing interface do we tell
the caller to go ahead and process the packet. */
-static int
+int
find_interface_by_agent_option(struct dhcp_packet *packet,
struct interface_info **out,
u_int8_t *buf, int len) {
* Agent Information option tacked onto its tail. If it is, tack
* the option on.
*/
-static int
+int
add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet,
unsigned length, struct in_addr giaddr) {
int is_dhcp = 0, mms;
return (length);
}
+#ifndef UNIT_TEST
+
#ifdef DHCPv6
/*
* Parse a downstream argument: [address%]interface[#index].
interface_snorf(tmp, (INTERFACE_REQUESTED | flags));
interface_dereference(&tmp, MDL);
}
+
+#endif /* UNIT_TEST */