Changeset b7155d7 in mainline
- Timestamp:
- 2022-06-24T09:44:00Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bb4ba92
- Parents:
- bbb7ffe
- git-author:
- Jiri Svoboda <jiri@…> (2022-07-23 19:43:22)
- git-committer:
- Jiri Svoboda <jiri@…> (2022-06-24 09:44:00)
- Location:
- uspace/srv/net/dhcp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dhcp/dhcp.c
rbbb7ffe rb7155d7 161 161 uint32_t xid; 162 162 errno_t rc; 163 size_t i; 163 164 164 165 rc = rndgen_uint32(dlink->rndgen, &xid); … … 176 177 hdr->opt_magic = host2uint32_t_be(dhcp_opt_magic); 177 178 178 opt[0] = opt_msg_type; 179 opt[1] = 1; 180 opt[2] = msg_dhcpdiscover; 181 182 opt[3] = opt_end; 183 184 return dhcp_send(&dlink->dt, msgbuf, sizeof(dhcp_hdr_t) + 4); 179 i = 0; 180 181 opt[i++] = opt_msg_type; 182 opt[i++] = 1; 183 opt[i++] = msg_dhcpdiscover; 184 185 opt[i++] = opt_param_req_list; 186 opt[i++] = 3; 187 opt[i++] = 1; /* subnet mask */ 188 opt[i++] = 6; /* DNS server */ 189 opt[i++] = 3; /* router */ 190 191 opt[i++] = opt_end; 192 193 return dhcp_send(&dlink->dt, msgbuf, sizeof(dhcp_hdr_t) + i); 185 194 } 186 195 -
uspace/srv/net/dhcp/dhcp_std.h
rbbb7ffe rb7155d7 110 110 /** Server identifier */ 111 111 opt_server_id = 54, 112 /** Parameter request list */ 113 opt_param_req_list = 55, 112 114 /** End */ 113 115 opt_end = 255
Note:
See TracChangeset
for help on using the changeset viewer.