Changes a u_int32_t. Uses a void * so there are no align restrictions */
| 2243 | |
| 2244 | /* Changes a u_int32_t. Uses a void * so there are no align restrictions */ |
| 2245 | void |
| 2246 | pf_change_a(void *a, u_int16_t *c, u_int32_t an, u_int8_t u) |
| 2247 | { |
| 2248 | u_int32_t ao; |
| 2249 | |
| 2250 | memcpy(&ao, a, sizeof(ao)); |
| 2251 | memcpy(a, &an, sizeof(u_int32_t)); |
| 2252 | *c = pf_cksum_fixup(pf_cksum_fixup(*c, ao / 65536, an / 65536, u), |
| 2253 | ao % 65536, an % 65536, u); |
| 2254 | } |
| 2255 | |
| 2256 | void |
| 2257 | pf_change_proto_a(struct mbuf *m, void *a, u_int16_t *c, u_int32_t an, u_int8_t udp) |
no test coverage detected