/* * Handle a BOOTP received packet. */ static void BootpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src, unsigned len) { Bootp_t *bp; debug("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%zu)\n", src, dest, len, sizeof (Bootp_t)); bp = (Bootp_t *)pkt; if (BootpCheckPkt(pkt, dest, src, len)) /* Filter out pkts we don't want */ return; /* * Got a good BOOTP reply. Copy the data into our variables. */ #ifdef CONFIG_STATUS_LED status_led_set (STATUS_LED_BOOT, STATUS_LED_OFF); #endif BootpCopyNetParams(bp); /* Store net parameters from reply */ /* Retrieve extended information (we must parse the vendor area) */ if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) BootpVendorProcess((uchar *)&bp->bp_vend[4], len); NetSetTimeout(0, (thand_f *)0); debug("Got good BOOTP\n"); auto_load(); }
static int InitializeApplication() { #if DEBUG __android_log_write(ANDROID_LOG_DEBUG, "Proxy", "Initialize application DLL."); #endif // lib 読み込み LoadApplication= dlopen( APP_LOAD_PATH , RTLD_LAZY ); if( !LoadApplication ){ return -1; } // API 取り出し auto_load( PROC_FUNC(getGLVersion) , LoadApplication , GET_XSTR( APP_FUNC(getGLVersion) ) ); auto_load( PROC_FUNC(initSequence) , LoadApplication , GET_XSTR( APP_FUNC(initSequence) ) ); auto_load( PROC_FUNC(frameFlip) , LoadApplication , GET_XSTR( APP_FUNC(frameFlip) ) ); auto_load( PROC_FUNC(finishGame) , LoadApplication , GET_XSTR( APP_FUNC(finishGame) ) ); auto_load( PROC_FUNC(inputPoint) , LoadApplication , GET_XSTR( APP_FUNC(inputPoint) ) ); auto_load( PROC_FUNC(inputDeviceKey) , LoadApplication , GET_XSTR( APP_FUNC(inputDeviceKey) ) ); auto_load( PROC_FUNC(rotateScreenOrientation) , LoadApplication , GET_XSTR( APP_FUNC(rotateScreenOrientation) ) ); auto_load( PROC_FUNC(toNativeSignal) , LoadApplication , GET_XSTR( APP_FUNC(toNativeSignal) ) ); auto_load( PROC_FUNC(resetViewport) , LoadApplication , GET_XSTR( APP_FUNC(resetViewport) ) ); auto_load( PROC_FUNC(onActivityPause) , LoadApplication , GET_XSTR( APP_FUNC(onActivityPause) ) ); auto_load( PROC_FUNC(onActivityResume) , LoadApplication , GET_XSTR( APP_FUNC(onActivityResume) ) ); auto_load( PROC_FUNC(clientControlEvent) , LoadApplication , GET_XSTR( APP_FUNC(clientControlEvent) ) ); auto_load( PROC_FUNC(WebViewControlEvent) , LoadApplication , GET_XSTR( APP_FUNC(WebViewControlEvent) ) ); auto_load( PROC_FUNC(clientResumeGame) , LoadApplication , GET_XSTR( APP_FUNC(clientResumeGame) ) ); auto_load( PROC_FUNC(jniOnLoad) , LoadApplication , GET_XSTR( APP_FUNC(jniOnLoad) ) ); if (javaVm != NULL) { PROC_FUNC(jniOnLoad)(javaVm, NULL); } return 0; }