Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV9: Internal DHCP #4304

Merged
merged 10 commits into from May 10, 2021
Merged

Conversation

TheLastRar
Copy link
Contributor

Adds an internal DHCP similer to what CLR_DEV9 offers for pcap & tap

Depends on (and includes) #4301

Still needs some testing (linux is largly untested) but should be functional

Copy link
Contributor

@RedDevilus RedDevilus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work fine:

image

inetctl: (ID=1) display_name=ifc000.dat + dev000.dat
inetctl: (ID=1) [ 192.168.150.69 ]

I did need to enable intercept DHCP, and i gave random IP to PS2.

image

Even works with pcap and changing the IP address.
Switched:
image
image
)
Bridged:
image
image

Just need to go to DEV9 and do these settings, go to network config of the game on auto settings and it will dynamically change itself.

So to have online gaming keep in mind doing PCSX2 DEV9 and then do the network config

Process of testing:
image
image

image
image
image
image
image
image
image
image
image
image
image
image

2-player lobby:
image
image

@lightningterror
Copy link
Contributor

Maybe the text fields for the ips can be moved a little lower so it is better aligned.

@TheLastRar
Copy link
Contributor Author

Maybe the text fields for the ips can be moved a little lower so it is better aligned.

Done, this is how it looks now

image

@TheLastRar
Copy link
Contributor Author

Is anything further needed for this?

@lightningterror
Copy link
Contributor

There are a couple of warnings that could be resolved in gcc and clang.

/home/runner/work/pcsx2/pcsx2/pcsx2/DEV9/PacketReader/IP/UDP/DNS/DNS_Classes.h: In constructor ‘PacketReader::IP::UDP::DNS::DNS_ResponseEntry::DNS_ResponseEntry(const string&, u16, u16, const std::vector<unsigned char>&, u32)’:
/home/runner/work/pcsx2/pcsx2/pcsx2/DEV9/PacketReader/IP/UDP/DNS/DNS_Classes.h:46:19: warning: ‘PacketReader::IP::UDP::DNS::DNS_ResponseEntry::data’ will be initialized after [-Wreorder]
   46 |   std::vector<u8> data;
      |                   ^~~~
/home/runner/work/pcsx2/pcsx2/pcsx2/DEV9/PacketReader/IP/UDP/DNS/DNS_Classes.h:45:7: warning:   ‘u32 PacketReader::IP::UDP::DNS::DNS_ResponseEntry::timeToLive’ [-Wreorder]
   45 |   u32 timeToLive;
      |       ^~~~~~~~~~
/home/runner/work/pcsx2/pcsx2/pcsx2/DEV9/PacketReader/IP/UDP/DNS/DNS_Classes.cpp:115:2: warning:   when initialized here [-Wreorder]
  115 |  DNS_ResponseEntry::DNS_ResponseEntry(const std::string& rName, u16 rType, u16 rClass, const std::vector<u8>& rData, u32 rTTL)
      |  ^~~~~~~~~~~~~~~~~
/home/runner/work/pcsx2/pcsx2/pcsx2/DEV9/PacketReader/IP/IP_Packet.h:63:31: warning: ‘PacketReader::IP::IP_Packet::payload’ will be initialized after [-Wreorder]
   63 |   std::unique_ptr<IP_Payload> payload;
      |                               ^~~~~~~
/home/runner/work/pcsx2/pcsx2/pcsx2/DEV9/PacketReader/IP/IP_Packet.h:52:6: warning:   ‘u8 PacketReader::IP::IP_Packet::protocol’ [-Wreorder]
   52 |   u8 protocol;
      |      ^~~~~~~~
/home/runner/work/pcsx2/pcsx2/pcsx2/DEV9/PacketReader/IP/IP_Packet.cpp:69:2: warning:   when initialized here [-Wreorder]
   69 |  IP_Packet::IP_Packet(IP_Payload* data)
      |  ^~~~~~~~~

@TheLastRar TheLastRar force-pushed the DEV9-InternalDHCP branch 2 times, most recently from 3f881d1 to 59483e7 Compare May 7, 2021 19:13
@TheLastRar
Copy link
Contributor Author

I should have addressed the warnings

Actions seemed to have issues with installing packages for some reason. pretty sure that's a fluke

@github-actions github-actions bot added the Dependencies Pull requests that update a dependency file label May 9, 2021
@github-actions github-actions bot removed the Dependencies Pull requests that update a dependency file label May 9, 2021
@TheLastRar
Copy link
Contributor Author

TheLastRar commented May 9, 2021

Rebased and squased a few commits (on this and dependent PRs)

@lightningterror
Copy link
Contributor

Maybe the text fields for the ips can be moved a little lower so it is better aligned.

Done, this is how it looks now

image

I think they can be moved a little further down for alignment.

@TheLastRar
Copy link
Contributor Author

TheLastRar commented May 9, 2021

The designer was really determined to not allow me to align these, ended up having to do a lot of reshuffling before I could get all the fields to align correctly.

Is this ok?

image

@lightningterror
Copy link
Contributor

The designer was really determined to not allow me to align these, ended up having to do a lot of reshuffling before I could get all the fields to align correctly.

Is this ok?

image

It's good now, btw I kinda forgot that tellow is working on porting the dev9 gui to wx anyway.

Copy link
Contributor

@lightningterror lightningterror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If testing was done and everything works good then it can be merged.

@lightningterror lightningterror merged commit bc25ffb into PCSX2:master May 10, 2021
@TheLastRar TheLastRar deleted the DEV9-InternalDHCP branch May 10, 2021 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants