(self, pkt, s)
| 910 | """ |
| 911 | |
| 912 | def getfield(self, pkt, s): |
| 913 | lst = [] |
| 914 | |
| 915 | length = 0 |
| 916 | if self.length_from is not None: |
| 917 | length = self.length_from(pkt) |
| 918 | remain = s |
| 919 | if length is not None: |
| 920 | remain, ret = s[:length], s[length:] |
| 921 | |
| 922 | while remain: |
| 923 | param_len = orb(remain[1]) # Get param length |
| 924 | current = remain[:2 + param_len] |
| 925 | remain = remain[2 + param_len:] |
| 926 | packet = self.m2i(pkt, current) |
| 927 | lst.append(packet) |
| 928 | |
| 929 | return remain + ret, lst |
| 930 | |
| 931 | |
| 932 | class BGPOptParam(Packet): |
nothing calls this directly
no test coverage detected