Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/ng_source.c
Show First 20 Lines • Show All 677 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* | /* | ||||
* Start sending queued data out the output hook | * Start sending queued data out the output hook | ||||
*/ | */ | ||||
static int | static int | ||||
ng_source_start(sc_p sc, uint64_t packets) | ng_source_start(sc_p sc, uint64_t packets) | ||||
{ | { | ||||
if (sc->output_ifp == NULL) { | if (sc->output_ifp == NULL && sc->stats.maxPps == 0) { | ||||
printf("ng_source: start without iface configured\n"); | printf("ng_source: start without iface or pps configured\n"); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
if (sc->node->nd_flags & NG_SOURCE_ACTIVE) | if (sc->node->nd_flags & NG_SOURCE_ACTIVE) | ||||
return (EBUSY); | return (EBUSY); | ||||
sc->node->nd_flags |= NG_SOURCE_ACTIVE; | sc->node->nd_flags |= NG_SOURCE_ACTIVE; | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |