Giter Site home page Giter Site logo

Comments (2)

aalemayhu avatar aalemayhu commented on May 17, 2024

The number of occurrences of common.Swab is:

Index File                      Line Content
    0 pkg/bpfdebug/debug.go      120 sport := common.Swab16(uint16(arg1 >> 16)) 
    1 pkg/bpfdebug/debug.go      121 dport := common.Swab16(uint16(arg1 & 0xFFFF)) 
    2 pkg/bpfdebug/debug.go      146 fmt.Printf("Local container found ifindex %d seclabel %d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
    3 pkg/bpfdebug/debug.go      154 fmt.Printf("CT entry found lifetime=%d, revnat=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
    4 pkg/bpfdebug/debug.go      158 fmt.Printf("CT created 2/2: %x revnat=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
    5 pkg/bpfdebug/debug.go      184 fmt.Printf("Master service lookup, addr.p4=%x key.dport=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
    6 pkg/bpfdebug/debug.go      188 fmt.Printf("Slave service lookup: slave=%d, dport=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
    7 pkg/bpfdebug/debug.go      190 fmt.Printf("Slave service lookup result: target.p4=%x port=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
    8 pkg/bpfdebug/debug.go      192 fmt.Printf("Reverse NAT lookup, index=%d\n", common.Swab16(uint16(n.Arg1))) 
    9 pkg/bpfdebug/debug.go      194 fmt.Printf("Performing reverse NAT, address.p4=%x port=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
   10 pkg/bpfdebug/debug.go      196 fmt.Printf("Master service lookup, addr=%x key.dport=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
   11 pkg/bpfdebug/debug.go      200 fmt.Printf("Slave service lookup result: target=%x port=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
   12 pkg/bpfdebug/debug.go      202 fmt.Printf("Performing reverse NAT, address=%x port=%d\n", n.Arg1, common.Swab16(uint16(n.Arg2))) 
   13 pkg/bpfdebug/debug.go      214 fmt.Printf("Resolved L4 policy to: %d / %d\n", common.Swab16(uint16(n.Arg1)), n.Arg2) 
   14 pkg/bpfdebug/debug.go      256 fmt.Printf("Packet to proxy port %d (Pre)\n", common.Swab16(uint16(n.Arg1))) 
   15 pkg/bpfdebug/debug.go      258 fmt.Printf("Packet to proxy port %d (Post)\n", common.Swab16(uint16(n.Arg1))) 
   16 pkg/endpoint/bpf.go         50 dport := common.Swab16(uint16(l4.Port)) 
   17 pkg/endpoint/bpf.go         60 redirect = common.Swab16(redirect) 
   18 pkg/endpoint/bpf.go        167 fmt.Fprintf(fw, "#define LXC_ID_NB %#x\n", common.Swab16(e.ID)) 
   19 pkg/endpoint/bpf.go        170 fmt.Fprintf(fw, "#define SECLABEL_NB %#x\n", common.Swab32(e.SecLabel.ID.Uint32())) 
   20 pkg/endpoint/bpf.go        174 fmt.Fprintf(fw, "#define SECLABEL_NB %#x\n", common.Swab32(invalid.Uint32())) 
   21 pkg/endpoint/bpf.go        192 fmt.Fprintf(fw, "{%#x,%#x},", common.Swab16(m.From), common.Swab16(m.To)) 
   22 pkg/maps/ctmap/ctmap.go    166 common.Swab16(value.revnat), 
   23 pkg/maps/ctmap/ctmap.go    167 common.Swab16(value.proxy_port)), 
   24 pkg/maps/lbmap/ipv4.go      70 n.Port = common.Swab16(n.Port) 
   25 pkg/maps/lbmap/ipv4.go     137 n.RevNat = common.Swab16(n.RevNat) 
   26 pkg/maps/lbmap/ipv4.go     138 n.Port = common.Swab16(n.Port) 
   27 pkg/maps/lbmap/ipv4.go     139 n.Weight = common.Swab16(n.Weight) 
   28 pkg/maps/lbmap/ipv4.go     202 n.Key = common.Swab16(n.Key) 
   29 pkg/maps/lbmap/ipv4.go     215 n.Port = common.Swab16(n.Port) 
   30 pkg/maps/lbmap/ipv6.go      77 n.Port = common.Swab16(n.Port) 
   31 pkg/maps/lbmap/ipv6.go     134 n.RevNat = common.Swab16(n.RevNat) 
   32 pkg/maps/lbmap/ipv6.go     135 n.Port = common.Swab16(n.Port) 
   33 pkg/maps/lbmap/ipv6.go     136 n.Weight = common.Swab16(n.Weight) 
   34 pkg/maps/lbmap/ipv6.go     195 n.Key = common.Swab16(n.Key) 
   35 pkg/maps/lbmap/ipv6.go     219 n.Port = common.Swab16(n.Port) 
   36 pkg/maps/lxcmap/lxcmap.go   83 return fmt.Sprintf("%d:%d", common.Swab16(pm.From), common.Swab16(pm.To)) 
   37 pkg/maps/lxcmap/lxcmap.go  120 common.Swab16(lxc.SecLabelID), 
   38 pkg/maps/lxcmap/lxcmap.go  149 SecLabelID: common.Swab16(uint16(ep.GetIdentity())), 
   39 pkg/maps/lxcmap/lxcmap.go  159 From: common.Swab16(pM.From), 
   40 pkg/maps/lxcmap/lxcmap.go  160 To:   common.Swab16(pM.To), 
   41 pkg/proxy/proxymap.go       75 n.SPort = common.Swab16(n.SPort) 
   42 pkg/proxy/proxymap.go       76 n.DPort = common.Swab16(n.DPort) 
   43 pkg/proxy/proxymap.go       86 n.OrigDPort = common.Swab16(n.OrigDPort) 

from cilium.

aalemayhu avatar aalemayhu commented on May 17, 2024

@tgraf Not sure I understand the detection part, but is something like this(https://github.com/scanf/cilium/commit/1d547fc01eeeebc2f1c58c4b8c11cfd2fb384800) what you were thinking?

from cilium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.