™N ÀÙ©Bcs2kZkZdgZdZdfd„ƒYZdS(sdivertisDivertcs2edd„Zd„Zed„Zed„ZRS(NcsZtitititƒ|_|iid|fƒ||_||_ |ii |ƒdS(Ns 127.0.0.1( ssocketsAF_INETsSOCK_RAWsIPPROTO_DIVERTsselfssocksbindsportsblocksbufsizes setblocking(sselfsportsblocksbufsizes./jmpc/python/divert.pys__init__$s    ics t‚dS(N(sNotImplementedError(sselfsbufsaddrs./jmpc/python/divert.pys handlepkt,scs8|tjo|ii||ƒSn|ii|ƒSdS(N(saddrsNonesselfssockssendtosbufssend(sselfsbufsaddrs./jmpc/python/divert.pyssendpkt/s cs“|igggg}|tjo|i|ƒntti|ƒ\}}}|o:|ii |i ƒ\}}|o|i||ƒnndS(N(sselfssocksargsstimeoutsNonesappendsapplysselectsrdsfoosrecvfromsbufsizesbufsaddrs handlepkt(sselfstimeoutsargssrdsfoosbufsaddrs./jmpc/python/divert.pyscheckandhandle5s (sTrues__init__s handlepktsNonessendpktscheckandhandle(s./jmpc/python/divert.pysDivert#s  N(ssocketsselects__all__sIPPROTO_DIVERTsDivert(s./jmpc/python/divert.pys?s