| 204 | } |
| 205 | |
| 206 | func (this *Chain) AddAcceptIPv6SetRule(setName string, userData []byte) (*Rule, error) { |
| 207 | return this.AddRule(&RuleOptions{ |
| 208 | Exprs: []expr.Any{ |
| 209 | &expr.Payload{ |
| 210 | DestRegister: 1, |
| 211 | Base: expr.PayloadBaseNetworkHeader, |
| 212 | Offset: 8, |
| 213 | Len: 16, |
| 214 | }, |
| 215 | &expr.Lookup{ |
| 216 | SourceRegister: 1, |
| 217 | SetName: setName, |
| 218 | }, |
| 219 | &expr.Verdict{ |
| 220 | Kind: expr.VerdictAccept, |
| 221 | }, |
| 222 | }, |
| 223 | UserData: userData, |
| 224 | }) |
| 225 | } |
| 226 | |
| 227 | func (this *Chain) AddDropIPv4SetRule(setName string, userData []byte) (*Rule, error) { |
| 228 | return this.AddRule(&RuleOptions{ |