MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / ethernet_trigger

Function ethernet_trigger

src/ethernet.cpp:79–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void ethernet_trigger (struct netdriverdata *ndd, void *vsd)
80{
81 if (!ndd)
82 return;
83 gui_flicker_led(LED_NET, 0, gui_data.net | 2);
84 switch (ndd->type)
85 {
86#ifdef WITH_SLIRP
87 case UAENET_SLIRP:
88 case UAENET_SLIRP_INBOUND:
89 {
90 struct ethernet_data *ed = (struct ethernet_data*)vsd;
91 if (slirp_data) {
92 uae_u8 pkt[4000];
93 int len = sizeof pkt;
94 int v;
95 uae_sem_wait (&slirp_sem1);
96 v = slirp_data->getfunc(ed->userdata, pkt, &len);
97 uae_sem_post (&slirp_sem1);
98 if (v) {
99 uae_sem_wait (&slirp_sem2);
100 uae_slirp_input(pkt, len);
101 uae_sem_post (&slirp_sem2);
102 }
103 }
104 }
105 return;
106#endif
107#ifdef HAVE_UAENET_BACKEND
108#ifdef WITH_UAENET_PCAP
109 case UAENET_PCAP:
110#endif
111#ifdef WITH_UAENET_TAP
112 case UAENET_TAP:
113#endif
114 uaenet_trigger (vsd);
115 return;
116#endif
117 }
118}
119
120void ethernet_receive_poll (struct netdriverdata *ndd, void *vsd)
121{

Callers 3

dev_threadFunction · 0.85
do_transmitFunction · 0.85
ne2000_ioport_writeFunction · 0.85

Calls 3

uae_slirp_inputFunction · 0.85
uaenet_triggerFunction · 0.85
gui_flicker_ledFunction · 0.50

Tested by

no test coverage detected