gencode.c (17749) | gencode.c (20645) |
---|---|
1/* 2 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 550 unchanged lines hidden (view full) --- 559 case DLT_PPP: 560 if (proto == ETHERTYPE_IP) 561 proto = 0x0021; /* XXX - need ppp.h defs */ 562 break; 563 564 case DLT_NULL: 565 /* XXX */ 566 if (proto == ETHERTYPE_IP) | 1/* 2 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 550 unchanged lines hidden (view full) --- 559 case DLT_PPP: 560 if (proto == ETHERTYPE_IP) 561 proto = 0x0021; /* XXX - need ppp.h defs */ 562 break; 563 564 case DLT_NULL: 565 /* XXX */ 566 if (proto == ETHERTYPE_IP) |
567 return (gen_cmp(0, BPF_W, (bpf_int32)AF_INET)); | 567 return (gen_cmp(0, BPF_W, (bpf_int32)htonl(AF_INET))); |
568 else 569 return gen_false(); 570 case DLT_EN10MB: 571 /* 572 * Having to look at SAP's here is quite disgusting, 573 * but given an internal architecture that _knows_ that 574 * it's looking at IP on Ethernet... 575 */ --- 1356 unchanged lines hidden --- | 568 else 569 return gen_false(); 570 case DLT_EN10MB: 571 /* 572 * Having to look at SAP's here is quite disgusting, 573 * but given an internal architecture that _knows_ that 574 * it's looking at IP on Ethernet... 575 */ --- 1356 unchanged lines hidden --- |