Symbol: ospf_hdr
usr.sbin/ospf6d/database.c
137
if (ibuf_set(buf, sizeof(struct ospf_hdr), &dd_hdr,
usr.sbin/ospf6d/interface.c
853
int offset = offsetof(struct ospf_hdr, chksum);
usr.sbin/ospf6d/lsupdate.c
223
if (ibuf_set_n32(buf, sizeof(struct ospf_hdr), nlsa) == -1)
usr.sbin/ospf6d/packet.c
127
struct ospf_hdr *ospf_hdr;
usr.sbin/ospf6d/packet.c
204
if (len < sizeof(*ospf_hdr)) {
usr.sbin/ospf6d/packet.c
208
ospf_hdr = (struct ospf_hdr *)buf;
usr.sbin/ospf6d/packet.c
210
if ((l = ospf_hdr_sanity_check(ospf_hdr, len, iface, &dest)) == -1)
usr.sbin/ospf6d/packet.c
213
nbr = nbr_find_id(iface, ospf_hdr->rtr_id);
usr.sbin/ospf6d/packet.c
214
if (ospf_hdr->type != PACKET_TYPE_HELLO && nbr == NULL) {
usr.sbin/ospf6d/packet.c
219
buf += sizeof(*ospf_hdr);
usr.sbin/ospf6d/packet.c
220
len = l - sizeof(*ospf_hdr);
usr.sbin/ospf6d/packet.c
223
switch (ospf_hdr->type) {
usr.sbin/ospf6d/packet.c
232
recv_hello(iface, &src.sin6_addr, ospf_hdr->rtr_id, buf, len);
usr.sbin/ospf6d/packet.c
253
ospf_hdr_sanity_check(struct ospf_hdr *ospf_hdr, u_int16_t len,
usr.sbin/ospf6d/packet.c
259
if (ospf_hdr->version != OSPF6_VERSION) {
usr.sbin/ospf6d/packet.c
261
ospf_hdr->version);
usr.sbin/ospf6d/packet.c
265
if (ntohs(ospf_hdr->len) > len ||
usr.sbin/ospf6d/packet.c
266
len <= sizeof(struct ospf_hdr)) {
usr.sbin/ospf6d/packet.c
268
ntohs(ospf_hdr->len));
usr.sbin/ospf6d/packet.c
273
if (ospf_hdr->area_id != iface->area->id.s_addr) {
usr.sbin/ospf6d/packet.c
274
id.s_addr = ospf_hdr->area_id;
usr.sbin/ospf6d/packet.c
280
if (ospf_hdr->area_id != 0) {
usr.sbin/ospf6d/packet.c
281
id.s_addr = ospf_hdr->area_id;
usr.sbin/ospf6d/packet.c
300
return (ntohs(ospf_hdr->len));
usr.sbin/ospf6d/packet.c
39
int ospf_hdr_sanity_check(struct ospf_hdr *, u_int16_t,
usr.sbin/ospf6d/packet.c
49
struct ospf_hdr ospf_hdr;
usr.sbin/ospf6d/packet.c
51
bzero(&ospf_hdr, sizeof(ospf_hdr));
usr.sbin/ospf6d/packet.c
52
ospf_hdr.version = OSPF6_VERSION;
usr.sbin/ospf6d/packet.c
53
ospf_hdr.type = type;
usr.sbin/ospf6d/packet.c
54
ospf_hdr.rtr_id = ospfe_router_id();
usr.sbin/ospf6d/packet.c
56
ospf_hdr.area_id = iface->area->id.s_addr;
usr.sbin/ospf6d/packet.c
57
ospf_hdr.instance = DEFAULT_INSTANCE_ID;
usr.sbin/ospf6d/packet.c
58
ospf_hdr.zero = 0; /* must be zero */
usr.sbin/ospf6d/packet.c
60
return (ibuf_add(buf, &ospf_hdr, sizeof(ospf_hdr)));
usr.sbin/ospf6d/packet.c
69
if (ibuf_set_n16(buf, offsetof(struct ospf_hdr, len),
usr.sbin/ospf6d/packet.c
74
if (ibuf_set_n16(buf, offsetof(struct ospf_hdr, chksum), 0) == -1)
usr.sbin/ospfd/auth.c
104
auth_data += ntohs(ospf_hdr->len);
usr.sbin/ospfd/auth.c
116
MD5Update(&hash, buf, ntohs(ospf_hdr->len));
usr.sbin/ospfd/auth.c
128
ntohl(ospf_hdr->auth_key.crypt.seq_num);
usr.sbin/ospfd/auth.c
151
if (ibuf_set_n16(buf, offsetof(struct ospf_hdr, len),
usr.sbin/ospfd/auth.c
158
if (ibuf_set(buf, offsetof(struct ospf_hdr, chksum),
usr.sbin/ospfd/auth.c
164
if (ibuf_set(buf, offsetof(struct ospf_hdr, chksum),
usr.sbin/ospfd/auth.c
168
if (ibuf_set(buf, offsetof(struct ospf_hdr, auth_key),
usr.sbin/ospfd/auth.c
180
if (ibuf_set(buf, offsetof(struct ospf_hdr, auth_key),
usr.sbin/ospfd/auth.c
39
struct ospf_hdr *ospf_hdr = buf;
usr.sbin/ospfd/auth.c
43
if (ntohs(ospf_hdr->auth_type) != (u_int16_t)iface->auth_type) {
usr.sbin/ospfd/auth.c
51
if (memcmp(ospf_hdr->auth_key.simple, iface->auth_key,
usr.sbin/ospfd/auth.c
52
sizeof(ospf_hdr->auth_key.simple))) {
usr.sbin/ospfd/auth.c
60
bzero(ospf_hdr->auth_key.simple,
usr.sbin/ospfd/auth.c
61
sizeof(ospf_hdr->auth_key.simple));
usr.sbin/ospfd/auth.c
63
if (in_cksum(ospf_hdr, ntohs(ospf_hdr->len))) {
usr.sbin/ospfd/auth.c
77
ospf_hdr->auth_key.crypt.keyid)) == NULL) {
usr.sbin/ospfd/auth.c
79
"interface %s", ospf_hdr->auth_key.crypt.keyid,
usr.sbin/ospfd/auth.c
84
if (nbr != NULL && ntohl(ospf_hdr->auth_key.crypt.seq_num) <
usr.sbin/ospfd/auth.c
91
if (ospf_hdr->auth_key.crypt.len != MD5_DIGEST_LENGTH) {
usr.sbin/ospfd/auth.c
97
if (len - ntohs(ospf_hdr->len) < MD5_DIGEST_LENGTH) {
usr.sbin/ospfd/database.c
143
if (ibuf_set(buf, sizeof(struct ospf_hdr), &dd_hdr,
usr.sbin/ospfd/lsupdate.c
178
if ((size_t)iface->mtu < sizeof(struct ip) + sizeof(struct ospf_hdr) +
usr.sbin/ospfd/lsupdate.c
181
if (ibuf_size(buf) > sizeof(struct ospf_hdr) +
usr.sbin/ospfd/lsupdate.c
211
if (ibuf_set_n32(buf, sizeof(struct ospf_hdr), nlsa) == -1)
usr.sbin/ospfd/ospfe.c
1133
IP_MAXPACKET - sizeof(struct ip) - sizeof(struct ospf_hdr) -
usr.sbin/ospfd/ospfe.c
847
IP_MAXPACKET - sizeof(struct ip) - sizeof(struct ospf_hdr) -
usr.sbin/ospfd/packet.c
121
struct ospf_hdr *ospf_hdr;
usr.sbin/ospfd/packet.c
201
if (len < sizeof(*ospf_hdr)) {
usr.sbin/ospfd/packet.c
205
ospf_hdr = (struct ospf_hdr *)buf;
usr.sbin/ospfd/packet.c
207
if ((l = ospf_hdr_sanity_check(&ip_hdr, ospf_hdr, len, iface)) == -1)
usr.sbin/ospfd/packet.c
210
nbr = nbr_find_id(iface, ospf_hdr->rtr_id);
usr.sbin/ospfd/packet.c
211
if (ospf_hdr->type != PACKET_TYPE_HELLO && nbr == NULL) {
usr.sbin/ospfd/packet.c
227
buf += sizeof(*ospf_hdr);
usr.sbin/ospfd/packet.c
228
len = l - sizeof(*ospf_hdr);
usr.sbin/ospfd/packet.c
231
switch (ospf_hdr->type) {
usr.sbin/ospfd/packet.c
244
recv_hello(iface, ip_hdr.ip_src, ospf_hdr->rtr_id, buf, len);
usr.sbin/ospfd/packet.c
281
ospf_hdr_sanity_check(const struct ip *ip_hdr, struct ospf_hdr *ospf_hdr,
usr.sbin/ospfd/packet.c
286
if (ospf_hdr->version != OSPF_VERSION) {
usr.sbin/ospfd/packet.c
288
ospf_hdr->version);
usr.sbin/ospfd/packet.c
292
if (ntohs(ospf_hdr->len) > len ||
usr.sbin/ospfd/packet.c
293
len <= sizeof(struct ospf_hdr)) {
usr.sbin/ospfd/packet.c
295
ntohs(ospf_hdr->len));
usr.sbin/ospfd/packet.c
300
if (ospf_hdr->area_id != iface->area->id.s_addr) {
usr.sbin/ospfd/packet.c
301
addr.s_addr = ospf_hdr->area_id;
usr.sbin/ospfd/packet.c
307
if (ospf_hdr->area_id != 0) {
usr.sbin/ospfd/packet.c
308
addr.s_addr = ospf_hdr->area_id;
usr.sbin/ospfd/packet.c
326
return (ntohs(ospf_hdr->len));
usr.sbin/ospfd/packet.c
40
struct ospf_hdr *, u_int16_t, const struct iface *);
usr.sbin/ospfd/packet.c
48
struct ospf_hdr ospf_hdr;
usr.sbin/ospfd/packet.c
50
bzero(&ospf_hdr, sizeof(ospf_hdr));
usr.sbin/ospfd/packet.c
51
ospf_hdr.version = OSPF_VERSION;
usr.sbin/ospfd/packet.c
52
ospf_hdr.type = type;
usr.sbin/ospfd/packet.c
53
ospf_hdr.rtr_id = ospfe_router_id();
usr.sbin/ospfd/packet.c
55
ospf_hdr.area_id = iface->area->id.s_addr;
usr.sbin/ospfd/packet.c
56
ospf_hdr.auth_type = htons(iface->auth_type);
usr.sbin/ospfd/packet.c
58
return (ibuf_add(buf, &ospf_hdr, sizeof(ospf_hdr)));