Linear Diophantine Equation

Can anyone please provide me with a better explanation with code for finding all the possible solutions of Linear Diophantine Equation within a given range? I’ve checked out cp-algorithms page but couldn’t understand the code given. It would be glad if anyone helps me up in understanding that.
Thank you in advance.